Skip to content

Commit 0436edb

Browse files
committed
version 9.0.10: use connection.permission in nmcli commands on linux to fix #116, cargo update
1 parent 10689f5 commit 0436edb

File tree

8 files changed

+271
-323
lines changed

8 files changed

+271
-323
lines changed

Cargo.lock

Lines changed: 253 additions & 317 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Flying Carpet/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flying-carpet"
3-
version = "9.0.9"
3+
version = "9.0.10"
44
description = "Encrypted file transfer over ad hoc WiFi between Android, iOS, Linux, macOS, and Windows"
55
authors = ["Theron Spiegl"]
66
license = "GPL-3.0-only"

Flying Carpet/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"productName": "FlyingCarpet",
3535
"mainBinaryName": "FlyingCarpet",
36-
"version": "9.0.9",
36+
"version": "9.0.10",
3737
"identifier": "dev.spiegl",
3838
"plugins": {},
3939
"app": {

Flying Carpet/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h1 style="font-size: 40px; margin-bottom: 0px; padding-bottom: 0px;"><b>Flying
3333
</div>
3434
<div class="form-check" style="margin: 10px; float: right; display: none" id="sendFolderDiv">
3535
<input class="form-check-input" type="checkbox" value="" id="sendFolderCheckbox">
36-
<label class="form-check-label" for="sendFolder">Send Folder</label>
36+
<label class="form-check-label" for="sendFolderCheckbox">Send Folder</label>
3737
</div>
3838
</div>
3939

Flying Carpet/src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ window.modeChange = modeChange;
421421
window.peerChange = peerChange;
422422

423423
const aboutMessage = `https://flyingcarpet.spiegl.dev
424-
Version: 9.0.9
424+
Version: 9.0.10
425425
theron@spiegl.dev
426426
Copyright (c) 2025, Theron Spiegl
427427
All rights reserved.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ sudo apt install libsoup2.4* libjavascriptcoregtk* libgdk-pixbuf2.0* librust-pan
6161

6262
+ Requires Windows 10 or later.
6363

64-
+ The Linux version was developed and tested on Linux Mint. I mainly intend for it to run on Debian-based distributions. I will try to help troubleshoot others if I can, but I may not be able to as I don't have access to spare machines. There has been at least one [issue](https://github.com/spieglt/FlyingCarpet/issues/64) running on Fedora, possibly to SELinux but I don't really know.
64+
+ The Linux version was developed and tested on Linux Mint. I mainly intend for it to run on Debian-based distributions. I will try to help troubleshoot others if I can, but I may not be able to as I don't have access to spare machines. There has been at least one [issue](https://github.com/spieglt/FlyingCarpet/issues/64) running on Fedora, possibly related to SELinux but I don't really know.
6565

6666
+ Sometimes when the Cancel button is hit on the desktop platforms, it can take time for the OS to finish trying to join or create a hotspot. Please only click the Cancel button once and wait a few seconds. This sounds like it should be easy to fix, but last time I tried it was not.
6767

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flying-carpet-core"
3-
version = "9.0.9"
3+
version = "9.0.10"
44
edition = "2021"
55
license = "GPL-3.0-only"
66

core/src/linux/network.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ pub async fn connect_to_peer<T: UI>(
5454

5555
fn start_hotspot(ssid: &str, password: &str, interface: &str) -> Result<(), FCError> {
5656
let nmcli = "nmcli";
57+
let user_str = &format!("user:{}", get_username());
5758
let commands = vec![
5859
vec![
5960
"con",
@@ -68,6 +69,8 @@ fn start_hotspot(ssid: &str, password: &str, interface: &str) -> Result<(), FCEr
6869
"yes",
6970
"ssid",
7071
ssid,
72+
"connection.permissions",
73+
&user_str,
7174
],
7275
vec![
7376
"con",
@@ -125,6 +128,7 @@ pub fn stop_hotspot(
125128

126129
async fn join_hotspot<T: UI>(ssid: &str, password: &str, interface: &str, ui: &T) -> Result<(), FCError> {
127130
let nmcli = "nmcli";
131+
let user_str = &format!("user:{}", get_username());
128132
let commands = vec![
129133
vec![
130134
"con",
@@ -139,6 +143,8 @@ async fn join_hotspot<T: UI>(ssid: &str, password: &str, interface: &str, ui: &T
139143
"yes",
140144
"ssid",
141145
ssid,
146+
"connection.permissions",
147+
&user_str,
142148
],
143149
vec!["con", "modify", ssid, "wifi-sec.key-mgmt", "wpa-psk"],
144150
vec!["con", "modify", ssid, "wifi-sec.psk", password],
@@ -197,6 +203,12 @@ fn find_gateway(interface: &str) -> Result<String, FCError> {
197203
Ok(stdout.trim().to_string())
198204
}
199205

206+
fn get_username() -> String {
207+
std::env::var("USER")
208+
.or_else(|_| std::env::var("USERNAME"))
209+
.unwrap_or_else(|_| "user".to_string())
210+
}
211+
200212
#[cfg(test)]
201213
mod test {
202214
use crate::{PeerResource, UI};

0 commit comments

Comments
 (0)