gui
This commit is contained in:
parent
66eb184cc5
commit
9543e4a8eb
|
@ -8,11 +8,16 @@ internet surveillance](https://ulovliglogning.dk/). Privacy through obscurity?
|
||||||
podman run --rm -it quay.io/caspervk/autosurfer:latest
|
podman run --rm -it quay.io/caspervk/autosurfer:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To show the Firefox GUI:
|
||||||
|
```shell
|
||||||
|
podman run --rm -it --network host --env DISPLAY --security-opt label=type:container_runtime_t quay.io/caspervk/autosurfer:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
```shell
|
```shell
|
||||||
nix build .#oci
|
nix build .#oci
|
||||||
./result | podman load
|
./result | podman load
|
||||||
podman run --rm -it autosurfer:0.0.1
|
podman run --rm -it autosurfer:dev
|
||||||
# podman push autosurfer:0.0.1 quay.io/caspervk/autosurfer:0.0.1
|
# podman push autosurfer:dev quay.io/caspervk/autosurfer:latest
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
import websockets
|
import websockets
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
|
@ -15,6 +16,8 @@ service = webdriver.FirefoxService(
|
||||||
options = webdriver.FirefoxOptions()
|
options = webdriver.FirefoxOptions()
|
||||||
# Selenium only checks /usr/bin/firefox by default
|
# Selenium only checks /usr/bin/firefox by default
|
||||||
options.binary_location = "/bin/firefox"
|
options.binary_location = "/bin/firefox"
|
||||||
|
|
||||||
|
if not os.getenv("DISPLAY"):
|
||||||
options.add_argument("--headless")
|
options.add_argument("--headless")
|
||||||
|
|
||||||
driver = webdriver.Firefox(service=service, options=options)
|
driver = webdriver.Firefox(service=service, options=options)
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/docker/examples.nix
|
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/docker/examples.nix
|
||||||
oci = pkgs.dockerTools.streamLayeredImage {
|
oci = pkgs.dockerTools.streamLayeredImage {
|
||||||
name = "autosurfer";
|
name = "autosurfer";
|
||||||
tag = "0.0.1";
|
tag = "dev";
|
||||||
created = builtins.substring 0 8 self.lastModifiedDate;
|
created = builtins.substring 0 8 self.lastModifiedDate;
|
||||||
contents = [
|
contents = [
|
||||||
env
|
env
|
||||||
|
|
Loading…
Reference in a new issue