Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a1c47cb
Remove ctor crate dependency from proxy_agent (#308)
ZhidongPeng Jan 23, 2026
efeaf6f
Add EventReaderLimits into telemetry event reader mod (#307)
ZhidongPeng Jan 26, 2026
ae54f3b
Reduce the LoggerLevel for some proxying logs (#309)
ZhidongPeng Jan 30, 2026
73a930a
Make ProxyConnectionSummary into TimeBucketedItem (#310)
ZhidongPeng Feb 2, 2026
e2209f2
update `bytes` to the latest compatible version (1.11.1 or newer) in…
ZhidongPeng Feb 3, 2026
5c99328
Telemetry update: Split event_sender from event_reader (#311)
ZhidongPeng Feb 4, 2026
1508a03
remove linux-tools-generic (#315)
ZhidongPeng Feb 5, 2026
f951bf4
Fix UT in internal build pipeline (#314)
ZhidongPeng Feb 5, 2026
c1f4141
Bump time from 0.3.36 to 0.3.47 (#316)
dependabot[bot] Feb 6, 2026
042127c
Support report extension status event and send out (#313)
ZhidongPeng Feb 10, 2026
cdfb7fb
Use SockRef.set_read_timeout without conversion (#320)
ZhidongPeng Feb 17, 2026
113efe6
perf improvements in misc_helpers functions (#319)
ZhidongPeng Feb 17, 2026
51ba167
perf improvements on string type & windows api (#321)
ZhidongPeng Feb 17, 2026
d1ce29e
perf improvement in get_process_info for Linux (#322)
ZhidongPeng Feb 18, 2026
75dd5d4
regex perf improvements (#317)
ZhidongPeng Feb 18, 2026
5fffae6
perf improvement: remove hyper_client::host_port_from_uri (#318)
ZhidongPeng Feb 18, 2026
a6b97a2
Fix: Privilege match must be case insensitive. (#323)
ZhidongPeng Feb 20, 2026
852fd72
Merge branch 'dev' of https://github.com/Azure/GuestProxyAgent into u…
ZhidongPeng Feb 23, 2026
ce35371
Prepare build for 1.0.40
ZhidongPeng Feb 23, 2026
2f4817a
Merge branch 'main' into update
ZhidongPeng Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
build-essential \
linux-tools-$(uname -r) \
linux-tools-common \
linux-tools-generic \
rpm \
musl-tools \

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Run Code Coverage for proxy_agent_shared
run: |
cargo llvm-cov --target x86_64-pc-windows-msvc --manifest-path ./proxy_agent_shared/Cargo.toml --output-path ./out/proxy_agent_shared_codeCov.txt --release
cargo llvm-cov --target x86_64-pc-windows-msvc --manifest-path ./proxy_agent_shared/Cargo.toml --output-path ./out/proxy_agent_shared_codeCov.txt --release -- --test-threads=1
type ./out/proxy_agent_shared_codeCov.txt

- name: Parse Code Coverage for proxy_agent_shared
Expand Down Expand Up @@ -292,7 +292,6 @@ jobs:
build-essential \
linux-tools-$(uname -r) \
linux-tools-common \
linux-tools-generic \
rpm \
musl-tools \
libssl-dev \
Expand Down Expand Up @@ -325,7 +324,7 @@ jobs:

- name: Run Code Coverage for proxy_agent_shared
run: |
cargo llvm-cov --target x86_64-unknown-linux-musl --manifest-path ./proxy_agent_shared/Cargo.toml --output-path ./out/proxy_agent_shared_codeCov.txt --release
cargo llvm-cov --target x86_64-unknown-linux-musl --manifest-path ./proxy_agent_shared/Cargo.toml --output-path ./out/proxy_agent_shared_codeCov.txt --release -- --test-threads=1
cat ./out/proxy_agent_shared_codeCov.txt

- name: Parse Code Coverage for proxy_agent_shared
Expand Down Expand Up @@ -464,7 +463,6 @@ jobs:
build-essential \
linux-tools-$(uname -r) \
linux-tools-common \
linux-tools-generic \
rpm \
musl-tools \
gcc-aarch64-linux-gnu \
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
],
"vscode-nmake-tools.workspaceBuildDirectories": [
"."
]
],
"chat.tools.terminal.autoApprove": {
"./build-linux.sh": true
}
}
56 changes: 33 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 10 additions & 18 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ if "%Target%"=="arm64" (
xcopy /Y /S /C /Q %out_dir% %root_path%proxy_agent_shared\target\%Configuration%\

echo ======= run rust proxy_agent_shared tests
echo call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture
call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture
if %ERRORLEVEL% NEQ 0 (
echo call cargo test proxy_agent_shared with exit-code: %errorlevel%
exit /b %errorlevel%
)
REM %ERRORLEVEL% inside a (...) block is expanded when the entire block is parsed, not when each line run
REM use exit /b 1 to propagate error codes inside a (...) block
echo call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture ^|^| exit /b 1
call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture || exit /b 1
)

echo ======= copy config file for windows platform
Expand Down Expand Up @@ -167,12 +165,9 @@ if "%Target%"=="arm64" (
xcopy /Y /S /C /Q %out_dir% %root_path%proxy_agent\target\%Configuration%\

echo ======= run rust proxy_agent tests
echo call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture
call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture
if %ERRORLEVEL% NEQ 0 (
echo call cargo test proxy_agent with exit-code: %errorlevel%
exit /b %errorlevel%
)
REM use exit /b 1 to propagate error codes inside a (...) block
echo call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture ^|^| exit /b 1
call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture || exit /b 1
)

echo ======= build proxy_agent_extension
Expand All @@ -196,12 +191,9 @@ if "%Target%"=="arm64" (
xcopy /Y /S /C /Q %out_dir% %root_path%proxy_agent_extension\target\%Configuration%\

echo ======= run rust proxy_agent_extension tests
echo call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture
call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture
if %ERRORLEVEL% NEQ 0 (
echo call cargo test proxy_agent_extension with exit-code: %errorlevel%
exit /b %errorlevel%
)
REM use exit /b 1 to propagate error codes inside a (...) block
echo call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture ^|^| exit /b 1
call cargo test --all-features %release_flag% --manifest-path %cargo_toml% --target-dir %out_path% --target %build_target% -- --test-threads=1 --nocapture || exit /b 1
)

echo ======= build proxy_agent_setup
Expand Down
6 changes: 3 additions & 3 deletions proxy_agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "azure-proxy-agent"
version = "1.0.39" # always 3-number version
version = "1.0.40" # always 3-number version
edition = "2021"
build = "build.rs"
readme = "README.md"
Expand All @@ -27,7 +27,8 @@ tower = { version = "0.5.2", features = ["full"] }
tower-http = { version = "0.6.2", features = ["limit"] }
clap = { version = "4.5.17", features =["derive"] } # Command Line Argument Parser
thiserror = "1.0.64"
ctor = "0.3.6" # used for test setup and clean up
libc = "0.2.147"
socket2 = "0.5" # Set socket options without tokio/std conversion

[dependencies.uuid]
version = "1.3.0"
Expand All @@ -40,7 +41,6 @@ features = [
sysinfo = "0.30.13" # read process information for Linux
aya = "0.13.1" # linux ebpf program loader
uzers = "0.12.1" # get user name
libc = "0.2.147" # linux call

[target.'cfg(not(windows))'.dependencies.nix]
version = "0.29.0"
Expand Down
49 changes: 27 additions & 22 deletions proxy_agent/src/common/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,39 +122,44 @@ impl Default for Config {
config_file_full_path = misc_helpers::get_current_exe_dir();
config_file_full_path.push(CONFIG_FILE_NAME);
}

Config::from_json_file(config_file_full_path)
}
}

impl Config {
/// Load config from a specific JSON file path
pub fn from_json_file(file_path: PathBuf) -> Self {
misc_helpers::json_read_from_file::<Config>(&file_path).unwrap_or_else(|_| {
panic!(
"Error in reading Config from Json file: {}",
misc_helpers::path_to_string(&file_path)
)
})
let mut config =
misc_helpers::json_read_from_file::<Config>(&file_path).unwrap_or_else(|_| {
panic!(
"Error in reading Config from Json file: {}",
misc_helpers::path_to_string(&file_path)
)
});
config.resolve_env_variables();
config
}

/// Resolve environment variables in path fields once during construction
/// This allows us to keep the rest of the code simple without worrying about env vars,
/// and also ensures that we only pay the cost of resolving env vars once at startup rather than on every access.
fn resolve_env_variables(&mut self) {
self.logFolder = misc_helpers::resolve_env_variables(&self.logFolder);
self.eventFolder = misc_helpers::resolve_env_variables(&self.eventFolder);
self.latchKeyFolder = misc_helpers::resolve_env_variables(&self.latchKeyFolder);
}

pub fn get_log_folder(&self) -> String {
match misc_helpers::resolve_env_variables(&self.logFolder) {
Ok(val) => val,
Err(_) => self.logFolder.clone(),
}
self.logFolder.clone()
}

pub fn get_event_folder(&self) -> String {
match misc_helpers::resolve_env_variables(&self.eventFolder) {
Ok(val) => val,
Err(_) => self.eventFolder.clone(),
}
self.eventFolder.clone()
}

pub fn get_latch_key_folder(&self) -> String {
match misc_helpers::resolve_env_variables(&self.latchKeyFolder) {
Ok(val) => val,
Err(_) => self.latchKeyFolder.clone(),
}
self.latchKeyFolder.clone()
}

pub fn get_monitor_interval(&self) -> u64 {
Expand Down Expand Up @@ -231,19 +236,19 @@ mod tests {
let config = create_config_file(config_file_path);

assert_eq!(
r#"C:\logFolderName"#.to_string(),
r#"C:\logFolderName"#,
config.get_log_folder(),
"Log Folder mismatch"
);

assert_eq!(
r#"C:\eventFolderName"#.to_string(),
r#"C:\eventFolderName"#,
config.get_event_folder(),
"Event Folder mismatch"
);

assert_eq!(
r#"C:\latchKeyFolderName"#.to_string(),
r#"C:\latchKeyFolderName"#,
config.get_latch_key_folder(),
"Latch Key Folder mismatch"
);
Expand All @@ -267,7 +272,7 @@ mod tests {
);

assert_eq!(
"ebpfProgramName".to_string(),
"ebpfProgramName",
config.get_ebpf_program_name(),
"get_ebpf_program_name mismatch"
);
Expand Down
Loading
Loading