RetroFed Forum
Your home away from modern life.
I made an ugly wireguard client GUI in slint for NixOS
Post Reply
AuthorMessage
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
(edited) Quote

It's not exclusive to NixOS, but I've only packaged it for NixOS.
The UI looks like shit, but it allows showing all the configs in /etc/wireguard and toggling them on or off with wg-quick.
The biggest issue I had was with slint. I can't make sense of it (yet).
This was written because after getting a windscribe subscription, I found out that the app doesn't work on #NixOS and the pull request to add it 1) doesn't work, 2) is being nitpicked to death.

17   Original
CameronDev programming.dev CameronDev@programming.dev
Joined: 2023-06-18
#2 · Quote Reply

You cant tell us the UI is ugly and not share screenshots of the gore!

9
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#3 · (edited) Quote Reply

You cant tell us the UI is ugly and not share screenshots of the gore!

:D I had edited the post and added a picture. I guess that's not federating well. Attached it to this comment. Hopefully it shows up.

Screenshot of the Wireguard UI with a list of configuration and a preview of the config

8
BCsven lemmy.ca BCsven@lemmy.ca
Joined: 2023-06-17
#4 · Quote Reply

Serious question: is it easier to build your own than expand on what's already developed?

1
CameronDev programming.dev CameronDev@programming.dev
Joined: 2023-06-18
#5 · Quote Reply

:D I had edited the post and added a picture. I guess that's not federating well. Attached it to this comment. Hopefully it shows up.

That isnt that bad, I've definitely seen worse UIs. Out of curiosity, why did you pick Slint?

5
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#6 · Quote Reply

That isnt that bad, I've definitely seen worse UIs. Out of curiosity, why did you pick Slint?

I didn't want any browser + Rust solution (bloated) --> no Tauri, no electron, no webkit, no QML (that's also webkit, isn't it?)

Didn't want immediate mode - just not convinced by it --> no egui and all that other stuff

Wanted to click together a UI and not fight too much with C++ bindings --> GTK4 got rid of their WYSIWYG editor, Qt creator doesn't do Rust AFAIK, and all Qt bindings seemed like a lot of work getting it to run

Slint just seemed like the best thing I could get running under an hour, given those conditions.

If you can think of something else that fits better given those criteria, I'd be happy to check it out.

5
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#7 · (edited) Quote Reply

Serious question: is it easier to build your own than expand on what's already developed?

No idea what that is. I'm on KDE if that means anything.

The goal was to be able to easily use all wireguard configs downloaded from windscribe --> no "just open a command line and run sudo wg-quick up ...". I don't want to enter the root password every time. Other VPN clients don't require that.

Does your thing achieve it somehow? I wouldn't mind looking at it if that's the case.

2
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#8 · Quote Reply

Future goals for when I have time again (from easy to hard) :

  • filter configs by connection status
  • sort configs by name or connection status
  • kill-switch (supposedly easy to add via Post-Up, Post-Down?)
  • download VPN configs from other providers: windscribe, proton, airvpn, ivpn, etc.
3
BCsven lemmy.ca BCsven@lemmy.ca
Joined: 2023-06-17
#9 · Quote Reply

No idea what that is. I'm on KDE if that means anything. The goal was to be able to easily use all wireguard configs downloaded from windscribe --> no "just open a command line and run sudo wg-quick up ...". I don't want to enter the root password every time. Other VPN clients don't require that. Does your thing achieve it somehow? I wouldn't mind looking at it if that's the case.

It's built into GNOME network manager I believe. I'm not a programmer, so you'd have to dig into what package supports that GUI. But somebody has written that GUI to add Wireguard in the VPN section.

1
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#10 · Quote Reply

It's built into GNOME network manager I believe. I'm not a programmer, so you'd have to dig into what package supports that GUI. But somebody has written that GUI to add Wireguard in the VPN section.

Yeah, that's not what I'm looking for. Windscribe has 200+ VPN locations. I'd have to manually import every single one. Sure, probably would take less time than it took writing this, but if they update a few configs (or everything at once for some reason), I'd have to go through the hassle of removing the existing configs and updating each one manually again.

If it had a batch importer or even just supported configs in /etc/wireguard (or a custom directory), that would also be great. But from what I understand, it's a frontend for NetworkManager, which uses a different configuration format for connections .nmconnection and is terribly documented.

5
BCsven lemmy.ca BCsven@lemmy.ca
Joined: 2023-06-17
#11 · Quote Reply

Yeah, that's not what I'm looking for. Windscribe has 200+ VPN locations. I'd have to manually import every single one. Sure, probably would take less time than it took writing this, but if they update a few configs (or everything at once for some reason), I'd have to go through the hassle of removing the existing configs and updating each one manually again. If it had a batch importer or even ...

Ah, I see.

3
CameronDev programming.dev CameronDev@programming.dev
Joined: 2023-06-18
#12 · Quote Reply

I didn't want any browser + Rust solution (bloated) --> no Tauri, no electron, no webkit, no QML (that's also webkit, isn't it?) Didn't want immediate mode - just not convinced by it --> no egui and all that other stuff Wanted to click together a UI and not fight too much with C++ bindings --> GTK4 got rid of their WYSIWYG editor, Qt creator doesn't do Rust AFAIK, and all Qt bindings s...

No suggestions, just curious about your rationale. I've used dioxus and egui a bit. Both have some fairly rough edges.

1
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#13 · Quote Reply

No suggestions, just curious about your rationale. I've used dioxus and egui a bit. Both have some fairly rough edges.

I might have to rethink my stance on no browsers, because Dioxus looks very easy compared to slint. And it supports mobile, which might come in handy for other projects have I have in mind.

You do say dioxus has fairly rough edges. Could you elaborate further? I was considering trying it out.

2
CameronDev programming.dev CameronDev@programming.dev
Joined: 2023-06-18
#14 · Quote Reply

I might have to rethink my stance on no browsers, because Dioxus looks very easy compared to slint. And it supports mobile, which might come in handy for other projects have I have in mind. You do say dioxus has fairly rough edges. Could you elaborate further? I was considering trying it out.

Are you familiar with react? Its basically react, but rust.

The rsx! macro is very clever, but it doesn't format with cargo fmt, you have to use dx fmt separately. Your mileage may vary as to whether your LSP or IDE understands it.

Hot reload was a bit more like a plain reload. Still incredibly useful, but most of the time it did a rebuild and restart.

I was trying to make a button that repeatedly fired as long as the mouse was held down, but for some reason the mouse up event would get lost, and then the button was stuck on.

The "native" desktop is basically a custom browser with the JS engine replaced with rust. Its not as heavy as a full browser, but its not light either. Haven't tried the mobile versions, I suspect they are similar.

If you know react, its not a bad way to transfer those skills. Worth a try IMO, I am still using it for my project, although I may rewrite and switch to egui if I can't solve my repeating button issue.

2
vald mbin.linuxnation.social vald@mbin.linuxnation.social
Joined: 2026-09-06
#15 · Quote Reply

Are you familiar with react? Its basically react, but rust. The rsx! macro is very clever, but it doesn't format with cargo fmt, you have to use dx fmt separately. Your mileage may vary as to whether your LSP or IDE understands it. Hot reload was a bit more like a plain reload. Still incredibly useful, but most of the time it did a rebuild and restart. I was trying to make a button that repeate...

Thank you for the response. I don't know React, but I do know Vue and Angular. I've heard React is a bigger beast than both put together. That kind of holds me back.

If slint pisses me off enough, I'll give Dioxus a shot. It's next on my list. Good luck with your app. Hopefully the button issue can be resolved.

2
Post Reply
Back to top