尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Browsers-as-a-service for automations and web agents
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Kernel provides sandboxed, ready-to-use Chrome browsers for browser automations and web agents. This repo powers our hosted services.
Sign up here!
This image can be used to run headful Chromium in a Docker container or with Unikraft unikernels. The unikernel implementation builds on top of the base Docker image and has the additional benefits of running on a unikernel:
https://github.com/user-attachments/assets/5888e823-5867-4c01-ad67-ec8989ba9573
You can build and run the Dockerfile directly as a Docker container.
cd images/chromium-headful
IMAGE=kernel-docker ./build-docker.sh
IMAGE=kernel-docker ENABLE_WEBRTC=true ./run-docker.sh
Alternatively, you can run the browser on a Unikraft unikernel.
curl -sSfL https://get.kraftkit.sh | sh
export UKC_METRO=<region>
export UKC_TOKEN=<secret>
IMAGE=YOUR_UKC_USERNAME/chromium-headless-test:latest images/chromium-headless/build-unikernel.sh
IMAGE=YOUR_UKC_USERNAME/chromium-headless-test:latest images/chromium-headless/run-unikernel.sh
or
IMAGE=YOUR_UKC_USERNAME/chromium-headful-test:latest VOLIMPORT_PREFIX=official images/chromium-headful/run-unikernel.sh
When the deployment finishes successfully, the Kraft CLI will print out something like this:
Deployed successfully!
│
├───────── name: kernel-cu
├───────── uuid: 0cddb958...
├──────── metro: <region>
├──────── state: starting
├─────── domain: https://<service_name>.kraft.host
├──────── image: onkernel/kernel-cu@sha256:8265f3f188...
├─────── memory: 8192 MiB
├────── service: <service_name>
├─ private fqdn: <id>
├─── private ip: <ip>
└───────── args: /wrapper
ENABLE_WEBRTC=true NEKO_ICESERVERS=xxx ./run-unikernel.shENABLE_WEBRTC=true, as direct exposure of UDP ports is not currently supported. NEKO_ICESERVERS: Describes multiple STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer. e.g. [{"urls": ["turn:turn.example.com:19302", "stun:stun.example.com:19302"], "username": "name", "credential": "password"}, {"urls": ["stun:stun.example2.com:19302"]}].browser.close() to disconnect to the browser, and the unikernel will go into standby after network activity ends. You can then reconnect to the instance using CDP. browser.close() ends the websocket connection but doesn't actually close the browser.VCPUS=8Port 9222 is exposed via ncat, allowing you to connect Chrome DevTools Protocol-based browser frameworks like Playwright and Puppeteer. You can use these frameworks to drive the browser in the cloud. You can also disconnect from the browser and reconnect to it.
First, fetch the browser's CDP websocket endpoint:
const url = new URL("http://localhost:9222/json/version");
const response = await fetch(url, {
headers: {
"Host": "<this can be anything>" // Required if using a unikernel
}
});
if (response.status !== 200) {
throw new Error(
`Failed to retrieve browser instance: ${
response.statusText
} ${await response.text()}`
);
}
// webSocketDebuggerUrl should look like:
// ws:///devtools/browser/06acd5ef-9961-431d-b6a0-86b99734f816
const { webSocketDebuggerUrl } = await response.json();
Then, connect a remote Playwright or Puppeteer client to it:
// Puppeteer
const browser = await puppeteer.connect({
browserWSEndpoint: webSocketDebuggerUrl,
});
// Playwright
const browser = await chromium.connectOverCDP(webSocketDebuggerUrl);
You can use the embedded live view to monitor and control the browser. The live view supports both read and write access to the browser. Both map to port 443.
ENABLE_WEBRTC=false in ./run-docker.sh.ENABLE_WEBRTC=true is set.-e ENABLE_READONLY_VIEW=true \ in docker run.You can use the embedded recording server to capture recordings of the entire screen in our headful images. It allows for one recording at a time and can be enabled with WITH_KERNEL_IMAGES_API=true
For example:
cd images/chromium-headful
export IMAGE=kernel-docker
./build-docker.sh
WITH_KERNEL_IMAGES_API=true ENABLE_WEBRTC=true ./run-docker.sh
# 1. Start a new recording
curl http://localhost:10001/recording/start -d {}
# recording in progress - run your agent
# 2. Stop recording
curl http://localhost:10001/recording/stop -d {}
# 3. Download the recorded file
curl http://localhost:10001/recording/download --output recording.mp4
Note: the recording file is encoded into a H.264/MPEG-4 AVC video file. QuickTime has known issues with playback so please make sure to use a compatible media player!
This repo powers our managed browser infrastructure.
Please read our contribution guidelines before submitting pull requests or issues.
See the LICENSE file for details.
For issues, questions, or feedback, please open an issue on this repository. You can also join our Discord.
Made with ❤️ by the Kernel team.