Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Created May 12, 2024 23:17
Show Gist options
  • Select an option

  • Save pojntfx/ec19bd2c63979ed50f0aa92b975226b3 to your computer and use it in GitHub Desktop.

Select an option

Save pojntfx/ec19bd2c63979ed50f0aa92b975226b3 to your computer and use it in GitHub Desktop.
Get Greenfield to run over HTTPS with CORS
diff --git a/packages/compositor-proxy-cli/example-applications.json b/packages/compositor-proxy-cli/example-applications.json
index 94f9749..233ac79 100644
--- a/packages/compositor-proxy-cli/example-applications.json
+++ b/packages/compositor-proxy-cli/example-applications.json
@@ -8,10 +8,7 @@
"/kwrite": {
"name": "KWrite",
"executable": "kwrite",
- "args": [
- "-platform",
- "wayland"
- ],
+ "args": ["-platform", "wayland"],
"env": {}
},
"/xterm": {
@@ -19,5 +16,41 @@
"executable": "xterm",
"args": [],
"env": {}
+ },
+ "/epiphany": {
+ "name": "Web",
+ "executable": "epiphany",
+ "args": [],
+ "env": {}
+ },
+ "/google-chrome": {
+ "name": "Google Chrome",
+ "executable": "google-chrome",
+ "args": ["--ozone-platform-hint=wayland"],
+ "env": {}
+ },
+ "/kgx": {
+ "name": "Console",
+ "executable": "kgx",
+ "args": [],
+ "env": {}
+ },
+ "/adwaita-1-demo": {
+ "name": "Adwaita Demo",
+ "executable": "adwaita-1-demo",
+ "args": [],
+ "env": {}
+ },
+ "/workbench": {
+ "name": "Workbench",
+ "executable": "flatpak",
+ "args": ["run", "re.sonny.Workbench"],
+ "env": {}
+ },
+ "/maps": {
+ "name": "Maps",
+ "executable": "flatpak",
+ "args": ["run", "org.gnome.Maps.Devel"],
+ "env": {}
}
}
diff --git a/packages/compositor-proxy-cli/src/main-args.ts b/packages/compositor-proxy-cli/src/main-args.ts
index 0f3c552..388fc8b 100644
--- a/packages/compositor-proxy-cli/src/main-args.ts
+++ b/packages/compositor-proxy-cli/src/main-args.ts
@@ -40,11 +40,11 @@ const options: Record<keyof ArgValues, NonNullable<ParseArgsConfig['options']>[s
},
'allow-origin': {
type: 'string',
- default: 'http://localhost:8080',
+ default: 'https://adwaita.serveo.net',
},
'base-url': {
type: 'string',
- default: 'ws://localhost:8081',
+ default: 'wss://apps.serveo.net',
},
'render-device': {
type: 'string',
#!/bin/bash
git clone https://github.com/udevbe/greenfield/
cd greenfield
git apply diff.patch
yarn workspace @gfld/compositor-shell run start
ssh -R adwaita.serveo.net:80:localhost:8080 serveo.net
yarn workspace @gfld/compositor-proxy-cli start
ssh -R apps.serveo.net:80:localhost:8081 serveo.net
# Now open https://adwaita.serveo.net and enter rems://apps.serveo.net/adwaita-1-demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment