Skip to content

Conversation

@hulto
Copy link
Collaborator

@hulto hulto commented Dec 30, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Refactor transport configuration.

  • Move interval and uri to a transport struct (instead of agent)
  • Add extra field
  • Moves proxy from IMIX_PROXY_URI to IMIX_TRANSPORT_EXTRA_HTTP_PROXY

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2782    ±0 2782    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#228 2782 2782 0 0 0 0 27.0s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2782 0 0 43.2s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
eldritch: random::string_impl::tests::test_string_uniform 3 40.1s 43.2s
eldritch: random::string_impl::tests::test_string_uniform 3 40.1s 43.2s
eldritch: random::string_impl::tests::test_string_uniform 3 40.1s 43.2s
eldritch: pivot::port_scan_impl::tests::test_portscan_return_type_starlark_dict_from_interpreter 3 2.3s 6.7s
eldritch: pivot::port_scan_impl::tests::test_portscan_return_type_starlark_dict_from_interpreter 3 2.3s 6.7s
eldritch: pivot::port_scan_impl::tests::test_portscan_return_type_starlark_dict_from_interpreter 3 2.3s 6.7s
eldritch: pivot::ssh_copy_impl::tests::test_pivot_ssh_copy 3 3.6s 6.6s
eldritch: pivot::ssh_copy_impl::tests::test_pivot_ssh_copy 3 3.6s 6.6s
eldritch: pivot::ssh_copy_impl::tests::test_pivot_ssh_copy 3 3.6s 6.6s
eldritch: pivot::ssh_exec_impl::tests::test_pivot_ssh_exec 3 3.6s 6.6s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@hulto
Copy link
Collaborator Author

hulto commented Dec 30, 2025

Tested on imix and imixv2.

  • grpc direct
  • http1 redirector
  • setting time
  • setting uri

"SetCallbackIntervalMessage: beacon is missing from config"
)),
}?;
// TODO: we can probably just modify the interval not rebuild the entire beacon see set_callback_uri.rs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is 1v we let it die 🫡

use crate::c2::beacon::Transport;
use crate::c2::ActiveTransport;

//TODO: Migrate most of this into a config crate or as a part of the agent.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Feels like a good follow on PR

#[prost(uint64, tag = "4")]
pub retry_interval: u64,
#[prost(bool, tag = "5")]
// #[prost(string, tag = "2")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Delete dead code.

let transport = crate::c2::beacon::Transport::Grpc;
#[cfg(not(any(feature = "dns", feature = "http1", feature = "grpc")))]
let transport = crate::c2::beacon::Transport::Unspecified;
let transport_type = match CALLBACK_URI.split(":").nth(0).unwrap_or("unspecified") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably need to add some testing to make sure the transport exists in the complied agent.

@hulto hulto marked this pull request as ready for review December 30, 2025 01:42
jabbate19
jabbate19 previously approved these changes Dec 31, 2025
Copy link
Collaborator

@jabbate19 jabbate19 left a comment

Choose a reason for hiding this comment

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

Please consider changes for rust code to make the unboxing cleaner, but otherwise :shipit:

@hulto hulto enabled auto-merge January 2, 2026 17:37
@hulto hulto requested a review from jabbate19 January 2, 2026 17:37
@hulto hulto added this pull request to the merge queue Jan 2, 2026
Merged via the queue into main with commit c16a3c1 Jan 2, 2026
7 checks passed
@hulto hulto deleted the pb-active-transport branch January 2, 2026 18:24
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.

4 participants