Skip to content

Add shared guest network routing - #1202

Open
Weidong Cui (wdcui) wants to merge 1 commit into
uliteboxfrom
wdcui/ulitebox/shared-guest-network
Open

Add shared guest network routing#1202
Weidong Cui (wdcui) wants to merge 1 commit into
uliteboxfrom
wdcui/ulitebox/shared-guest-network

Conversation

@wdcui

Copy link
Copy Markdown
Member

Summary

  • add explicit broker-wide guest and gateway identity with typed guest, gateway, and external routing
  • enforce guest-network, external destination, and protocol-specific gateway policy, translating authorized gateway traffic to host loopback
  • route private guest TCP/UDP and runner traffic while retaining one native UDP endpoint for all destinations outside the sandbox

Custom address configuration and virtual TCP remain separate follow-up work.

Testing

  • cargo fmt
  • targeted build and Clippy for changed packages
  • targeted Nextest and runner integration suites (333 tests)
  • cargo test -p litebox_broker_userland --test userland_broker

Introduce a broker-wide private guest identity and policy-controlled host gateway routing for TCP and UDP.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure constructible_struct_adds_field: struct exhaustively constructible through public API adds field ---

Description:
A pub struct that could be exhaustively constructed with a literal using only public API has a new pub field, breaking existing exhaustive literals.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field AcceptedPlatformSocket.remote in /home/runner/work/litebox/litebox/litebox_broker_core/src/socket.rs:231

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/inherent_method_missing.ron

Failed in:
  GuestSocketBinding::is_valid, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/d1f71bdda0758d08dc633482c44326fe6e8c769d/litebox_broker_core/src/socket.rs:257

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_broker_core::BrokerCore::new takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/d1f71bdda0758d08dc633482c44326fe6e8c769d/litebox_broker_core/src/lib.rs:127, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_broker_core/src/lib.rs:132
  litebox_broker_core::BrokerCore::new_with_limits takes 3 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/d1f71bdda0758d08dc633482c44326fe6e8c769d/litebox_broker_core/src/lib.rs:132, but now takes 4 parameters in /home/runner/work/litebox/litebox/litebox_broker_core/src/lib.rs:146
  litebox_broker_core::socket::GuestSocketBinding::covers takes 1 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/d1f71bdda0758d08dc633482c44326fe6e8c769d/litebox_broker_core/src/socket.rs:269, but now takes 2 parameters in /home/runner/work/litebox/litebox/litebox_broker_core/src/socket/network.rs:193

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field remote_address of struct AcceptedPlatformSocket, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/d1f71bdda0758d08dc633482c44326fe6e8c769d/litebox_broker_core/src/socket.rs:309

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters, not counting the receiver (self) parameter.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/method_parameter_count_changed.ron

Failed in:
  litebox_broker_platform_linux_userland::LinuxSocketProvider::new takes 2 parameters in /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/d1f71bdda0758d08dc633482c44326fe6e8c769d/litebox_broker_platform_linux_userland/src/socket.rs:177, but now takes 3 parameters in /home/runner/work/litebox/litebox/litebox_broker_platform_linux_userland/src/socket.rs:183

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.

1 participant