Skip to content

Feat/routing scripts#113

Merged
brianmcgillion merged 11 commits intotiiuae:mainfrom
enesoztrk:feat/routing_scripts
Dec 12, 2025
Merged

Feat/routing scripts#113
brianmcgillion merged 11 commits intotiiuae:mainfrom
enesoztrk:feat/routing_scripts

Conversation

@enesoztrk
Copy link
Copy Markdown
Collaborator

@enesoztrk enesoztrk commented Nov 25, 2025

  • Replacing freely adding PreUp, PreDown, PostUp, PostDown hooks by the user with controlled routing scripts, improving security by preventing arbitrary command execution.
  • Adding embedded logo
  • Improving reliability and robustness of configuration handling.
  • Reducing risk of invalid configurations.
  • Enhancing UI responsiveness with non-blocking I/O.
  • Providing better user feedback and tooling support for scripts and interface binding.

Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch 5 times, most recently from 676250c to 98e0eb9 Compare November 27, 2025 07:25
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch from 98e0eb9 to 32d724c Compare November 27, 2025 08:15
@enesoztrk enesoztrk marked this pull request as ready for review November 27, 2025 08:23
Copy link
Copy Markdown

@slakkala slakkala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bunch of comments, will continue later.

Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
Copy link
Copy Markdown

@inzanity inzanity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added another bunch of comments, but I believe the spawn_oneshot_command() usage is the only one that really needs fixing.

@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch from a1d985b to e72c941 Compare December 2, 2025 16:24
@enesoztrk enesoztrk requested a review from slakkala December 2, 2025 16:25
@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch 2 times, most recently from 4b91e1d to f852d96 Compare December 3, 2025 07:41
@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch from f852d96 to 0c85ade Compare December 4, 2025 07:50
@enesoztrk enesoztrk requested a review from slakkala December 4, 2025 07:52
Copy link
Copy Markdown

@slakkala slakkala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's anything blocking anymore, some further cleanups suggested.

@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch from 0c85ade to 5a95637 Compare December 4, 2025 12:54
@enesoztrk enesoztrk requested a review from slakkala December 4, 2025 12:56
Copy link
Copy Markdown

@slakkala slakkala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@enesoztrk enesoztrk mentioned this pull request Dec 9, 2025
19 tasks
Copy link
Copy Markdown
Collaborator

@brianmcgillion brianmcgillion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements controlled routing scripts for WireGuard configurations, replacing user-provided PreUp/PostUp/PreDown/PostDown hooks with pre-validated scripts to enhance security. It adds embedded logos, improves configuration validation, implements non-blocking I/O for better UI responsiveness, and introduces interface binding support for routing scripts.

Key Changes:

  • Replaced arbitrary command execution in WireGuard hooks with validated routing scripts
  • Added configuration validation and error aggregation during initialization
  • Implemented async operations for file I/O and command execution to prevent UI blocking

Reviewed changes

Copilot reviewed 12 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Cargo.toml Updated Rust edition and added dependencies (anyhow, pnet_datalink)
src/config.rs Added routing script parsing/validation, binding interface support, comprehensive tests
src/main.rs Implemented async initialization, routing script/interface loading, embedded logos
src/tunnel.rs Refactored to TunnelData model, added validation, async toggle execution
src/overview.rs Added routing script/binding interface UI, field change tracking
src/utils.rs Added export path validation, improved error handling, Option update helper
src/generator.rs Removed hardcoded iptables rules, made operations async
src/cli.rs Split config directory into configs and scripts subdirectories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch from 5a95637 to b5fc0e2 Compare December 12, 2025 09:30
Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
@enesoztrk enesoztrk force-pushed the feat/routing_scripts branch from b5fc0e2 to 527b21c Compare December 12, 2025 09:44
@brianmcgillion brianmcgillion merged commit 513e06e into tiiuae:main Dec 12, 2025
2 checks passed
@brianmcgillion brianmcgillion deleted the feat/routing_scripts branch December 12, 2025 12:16
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.

6 participants