This project is a URL snapshot generator similar to Urlbox, written in Rust. It utilizes Chrome Headless as the renderer and supports various storage backend options provided by OpenDAL, including but not limited to S3, local files, and Google Cloud Storage.
Follow the steps below to install the service:
- Download and Extract the Chrome files:
$ wget https://registry.npmmirror.com/-/binary/chromium-browser-snapshots/Linux_x64/1045489/chrome-linux.zip && unzip chrome-linux.zip
- Make sure Chrome installation is successful:
$ ./chrome/chrome --version
- Download the appropriate build for your platform from this project's "actions" section or build web-shim yourself.
- Start the service with the following command:
$ CHROME=./chrome-linux/chrome ./web-shim
Then, visit https://{YOUR_SERVER_ADDRESS}/screenshot/default/?url=http://example.com
to start using the service.
If everything goes as expected, you should see a screenshot of http://example.com
.
The project works by accepting a URL from the user and generating a snapshot. In addition, it provides the capability to verify request parameters using an AWS Pre Sign-like capability by signing the request parameters with an access token. Upon receiving user requests, these parameters are verified to ensure that the service is not misused. Another included feature is built-in IP and bucket traffic control for resource management.
To be added.
This project is licensed under the terms of the MIT license.