Skip to content

Add TUN device name setting support to easytier-gui#362

Merged
KKRainbow merged 2 commits intoEasyTier:mainfrom
Hs-Yeah:feat/gui-dev-name
Sep 24, 2024
Merged

Add TUN device name setting support to easytier-gui#362
KKRainbow merged 2 commits intoEasyTier:mainfrom
Hs-Yeah:feat/gui-dev-name

Conversation

@Hs-Yeah
Copy link
Copy Markdown
Contributor

@Hs-Yeah Hs-Yeah commented Sep 23, 2024

No description provided.

@Hs-Yeah Hs-Yeah changed the title Add TUN device name setting support to easytier-gui (WIP) Add TUN device name setting support to easytier-gui Sep 24, 2024
@Hs-Yeah
Copy link
Copy Markdown
Contributor Author

Hs-Yeah commented Sep 24, 2024

I think we can wait for #363 to be merged, after that I can update the logic to fetch the dev_name for Status page from global_ctx.

@Hs-Yeah Hs-Yeah marked this pull request as draft September 24, 2024 05:08
@KKRainbow
Copy link
Copy Markdown
Member

#363 is merged

@Hs-Yeah Hs-Yeah changed the title (WIP) Add TUN device name setting support to easytier-gui Add TUN device name setting support to easytier-gui Sep 24, 2024
@Hs-Yeah Hs-Yeah marked this pull request as ready for review September 24, 2024 08:04
@Hs-Yeah
Copy link
Copy Markdown
Contributor Author

Hs-Yeah commented Sep 24, 2024

New commit pushed, dev_name is now fetched from the global_ctx of each instance.

Tested on Windows 10, with two EasyTier networks running as the same time.

@KKRainbow
Copy link
Copy Markdown
Member

error[E0382]: borrow of partially moved value: `data`
   --> easytier/src/launcher.rs:176:50
    |
138 |           tasks.spawn(async move {
    |  _____________________-
139 | |             loop {
140 | |
141 | |                 // Update TUN Device Name
142 | |                 *data.tun_dev_name.write().unwrap() = global_ctx_c.get_flags().dev_name.clone();
    | |                  ----------------- variable partially moved due to use in coroutine
...   |
172 | |             }
173 | |         });
    | |_________- value partially moved here
...
176 |           Self::run_routine_for_android(&instance, &data, &mut tasks).await;
    |                                                    ^^^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `data.tun_dev_name` has type `Arc<std::sync::RwLock<std::string::String>>`, which does not implement the `Copy` trait

For more information about this error, try `rustc --explain E0382`.
error: could not compile `easytier` (lib) due to 1 previous error
    Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "easytier-gui", "--manifest-path", "/home/runner/work/EasyTier/EasyTier/easytier-gui/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--features", "tauri/custom-protocol tauri/rustls-tls", "--lib", "--release"] exited with code 101
 ELIFECYCLE  Command failed with exit code 1.

@KKRainbow KKRainbow merged commit 3f9a1d8 into EasyTier:main Sep 24, 2024
@Hs-Yeah Hs-Yeah deleted the feat/gui-dev-name branch September 24, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants