Using WebRTC to connect to puppeteer which running on remote server.
This project is still under developing, open issue if you encounter any bug.
Following is known bug:
- Do not support file download.
- Bad performance.
- clone this repo
git clone https://github.com/bepsvpt-me/remote-browser.git
- run
chrome-dependencies-installer.sh
as root to install chrome dependencies(only test on Ubuntu 19.10) - run
yarn install
ornpm install
to install node dependencies - copy
.env.example
to.env
and setup environment variables
Run following command to start server:
xvfb-run -a --server-args="-screen 0 1x1x24 -ac -nolisten tcp +extension RANDR" yarn serve
We have provide pm2 ecosystem config file, just follow commands below.
start pm2 instance
./node_modules/.bin/pm2 start ecosystem.config.cjs
save process list
./node_modules/.bin/pm2 save
setup startup script
./node_modules/.bin/pm2 startup
You can find more information from pm2 document.
- Puppeteer API - https://pptr.dev
- Chrome DevTools Protocol - https://chromedevtools.github.io/devtools-protocol/
- Chromium Command Line Switches - https://peter.sh/experiments/chromium-command-line-switches/
- WebRTC API - https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API
- SDP RFC - rfc3264, rfc4566
- MediaStreamTrack Content Hints - https://www.w3.org/TR/mst-content-hint/
This project is licensed under GNU Affero General Public License v3.0 only.