|
5 | 5 | <p> |
6 | 6 | Run games in a secure sandbox, various native and non-native titles are supported. |
7 | 7 | </p> |
| 8 | + <img alt="Downloads" src="https://img.shields.io/github/downloads/RX0FA/raptor-cage/total?style=flat-square&label=DOWNLOADS&labelColor=0567ff&color=696969" /> |
| 9 | + <img alt="Latest Release" src="https://img.shields.io/github/v/release/RX0FA/raptor-cage?style=flat-square&label=LATEST%20RELEASE&labelColor=0567ff&color=696969" /> |
| 10 | + <img alt="AUR" src="https://img.shields.io/aur/version/raptor-cage-bin?style=flat-square&label=AUR&labelColor=0567ff&color=696969" /> |
8 | 11 | </div> |
9 | 12 |
|
10 | 13 | ## ⬇️ Installation |
@@ -32,22 +35,45 @@ sudo install -Dm755 raptor-cage "/usr/local/bin/rcage" |
32 | 35 |
|
33 | 36 | ## 💡 Usage |
34 | 37 |
|
35 | | -### Command Line |
| 38 | +> ⚠️ Network access is denied by default |
| 39 | +
|
| 40 | +### Command Line Examples |
36 | 41 |
|
37 | 42 | ```bash |
38 | 43 | # Run Windows game, runner and prefix paths are relative to Bottles data directory. |
39 | 44 | rcage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game -b game.exe |
40 | 45 |
|
41 | 46 | # Run native binary, and pass custom parameters. |
42 | 47 | rcage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game -b native_binary -- --param1 |
| 48 | + |
| 49 | +# Mount game path as read-write, mount installer path as read-only, then start interactive shell. |
| 50 | +rcage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game:rw -v ~/installers:/installers: |
| 51 | + |
| 52 | +# Mount game path as read-write, mount installer path as read-only, then start "setup.exe". |
| 53 | +rcage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game:rw -v ~/installers:/installers: -b /installers/setup.exe |
43 | 54 | ``` |
44 | 55 |
|
| 56 | +### `rcage run` Enum Parameters |
| 57 | + |
| 58 | +* --network-mode: |
| 59 | + * `full_access`: no network restrictions at all. |
| 60 | + * `restricted_access`: restricts access to some network features such as DNS resolving and SSL certificates, however internet connection is still possible through direct IPs. |
| 61 | + * `no_access`: network access is completely blocked, this is the default value if no option is passed. |
| 62 | +* --device-access: |
| 63 | + * `all`: sandboxed program will have access to all devices i.e., `/dev` is completely exposed inside the sandbox. |
| 64 | + * `minimal`: a limited amount of devices are exposed inside the sandbox i.e., GPU, gamepads, etc; this is the default value. |
| 65 | +* --upscale-mode: |
| 66 | + * `none`: no upscaling applied, this is the default value. |
| 67 | + * `dlss`: enable NVIDIA DLSS, **support depends on the wine runner**, raptor-cage only configures the necessary flags. |
| 68 | + * `fsr`: enable FSR, it requires additional options separated by `:`, the command value should look like `fsr:mode:strength`. Mode can be one of `none`, `quality`, `balanced`, `performance` or `ultra`; strength is a value that goes from 0 to 5; (example command: `--upscale-mode=fsr:balanced:1`). **Support depends on the wine runner** being used. |
| 69 | +* --sync-mode: one of `none`, `fsync` or `esync`. The default value depends on the runner being used. |
| 70 | + |
45 | 71 | ## 📌 Frequently Asked Questions |
46 | 72 |
|
47 | 73 | * How to enable MangoHud? |
48 | 74 | Use the `-e MANGOHUD=1` parameter for games that use DXVK and VK3D, other games (OpenGL and WineD3D) may require to prepend `mangohud` before the binary (e.g., `mangohud wine game.exe`). |
49 | 75 | * What is the difference with Bottles? |
50 | | - Bottles is a GUI to manage Wine/Proton instances and their dependencies, it runs under Flatpak and it uses the same sandbox permissions as Bottles itself, that means that applications that are launched from Bottles have access to everything Bottles has access to (you can see what can Bottles access [here](https://github.com/flathub/com.usebottles.bottles/blob/master/com.usebottles.bottles.yml#L9)), raptor-cage launches applications with a restricted sandbox by default, and allows the user to adjust permissions independently. |
| 76 | + Bottles is a GUI to manage Wine/Proton instances and their dependencies, and it runs under Flatpak; applications that are launched from Bottles have access to everything Bottles has access to (you can see what can Bottles access [here](https://github.com/flathub/com.usebottles.bottles/blob/master/com.usebottles.bottles.yml#L9)), raptor-cage launches applications with a restricted sandbox by default, and allows the user to adjust permissions independently. |
51 | 77 | * Do I need Bottles in order to use raptor-cage? |
52 | 78 | No, Bottles is not needed, although is highly recommended in order to manage Wine/Proton versions and dependencies. If you don't want to use Bottles, you can download any Wine/Proton version you like, extract it anywhere and choose the respective path when running raptor-cage (`-r`). |
53 | 79 | * What is the difference with Bubblewrap? |
@@ -83,11 +109,10 @@ cargo upgrade --dry-run |
83 | 109 | #### General |
84 | 110 |
|
85 | 111 | * Some games (like HC2, DXM) create a detached sub-process, since we are using `--die-with-parent`, said games will not run when executed directly (with `-b` parameter, executing a shell and launching manually still works); so we need to think in a way to detect child processes and wait for them, or at least add a flag to enable this feature. Disabling `--die-with-parent` is another option, but that would undermine security a bit and leave lingering wine processes all over the place. Maybe add a `--lead-process=NAME_EXE:TIMEOUT` to wait for another process inside the sandbox. |
86 | | -* Implement bash autocompletion, should be able to autocomplete prefix and runner names based on the ones detected under Bottles. |
| 112 | +* Implement bash autocompletion, should be able to autocomplete prefix and runner names based on the ones detected under Bottles. Also consider using [clap_complete](https://crates.io/crates/clap_complete). |
87 | 113 | * Add `integrate` sub-command to create integrations e.g., `.desktop` shortcut, entry on Heroic launcher. |
88 | 114 | * Native wayland support, see https://www.phoronix.com/news/Wine-9.22-Released and https://wiki.archlinux.org/title/Wine#Wayland. Also consider bringing back `--unshare-ipc` if using Wayland prevents the issue described in bwrap.rs#90. |
89 | 115 | * Add `kill` sub-command to terminate all processes in a sandbox, need to connect to existing bwrap container. |
90 | | -* Add argument to mount additional paths (needed for installers and maintenance), syntax can be similar to Docker's `-v PATH:FLAGS`. |
91 | 116 | * When using the `integrate` sub-command to create a `.desktop` shortcut, extract executable icon and set it respectively. It can be done with a small windows executable calling a win32 API call or natively on Linux by using `wrestool`. |
92 | 117 | * Add NTSYNC support, see also https://www.phoronix.com/news/Linux-6.14-NTSYNC-Driver-Ready. |
93 | 118 |
|
|
0 commit comments