Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d7f2fc1
feat: add proxy-core crate with shared types, MDD service resolver, a…
arvindr19 Apr 22, 2026
a5837f9
PR1: Add proxy-core to workspace members
arvindr19 Apr 22, 2026
da5fa2c
Restore comments and original structure to Cargo.toml and deny.toml
arvindr19 Apr 22, 2026
4af1e6a
fix: remove unused Serialize & parse_response fct
arvindr19 Apr 23, 2026
b0c39a0
fix: review comments & split service_resolver
arvindr19 Apr 23, 2026
b1ef0eb
refactor: remove DiagHandler trait from proxy-core
arvindr19 Apr 27, 2026
06c5c41
Fix: Addresss review comments
arvindr19 Apr 28, 2026
7d6e2bf
Fix: svg images fixed
arvindr19 Apr 28, 2026
edf6c99
Refactoe: service_resolver mod into subcompoents
arvindr19 Apr 29, 2026
a3b2e13
Fix: address review comments
arvindr19 Apr 30, 2026
1bcaf23
refactor: encapsulate ServiceResolver internals behind facade methods
arvindr19 May 12, 2026
b33b7bf
fix: address review comments for service_parsing
arvindr19 May 12, 2026
9b6cc02
fix: parsing cli, used clap and url crate
arvindr19 May 7, 2026
930c472
refactor: encapsulate ServiceResolver internals behind facade methods
arvindr19 May 12, 2026
caee347
refactor: address review comments for service_parsing
arvindr19 Apr 30, 2026
d3f5279
feat: add proxy-sovd crate with SOVD REST client and UDS<->SOVD mapper
arvindr19 Apr 22, 2026
b44c19c
fix: update diag_handler to use ResolvedService struct
arvindr19 Apr 24, 2026
247e82f
refactor: remove async_trait, convert DiagHandler impl to inherent me…
arvindr19 Apr 27, 2026
7281e81
Fix: self review
arvindr19 Apr 28, 2026
6bbda51
Fix: address review comments
arvindr19 Apr 29, 2026
925d1e6
refactor: address review comments for proxy-sovd
arvindr19 Apr 30, 2026
22e85b8
fix: address review comments for proxy-sovd
arvindr19 May 7, 2026
23fb206
fix: address review comments for proxy-sovd
arvindr19 May 12, 2026
2b7d610
refactor: address review comments for service_parsing
arvindr19 Apr 30, 2026
f8ca5c7
feat: add proxy-sovd crate with SOVD REST client and UDS<->SOVD mapper
arvindr19 Apr 22, 2026
2d65b43
refactor: remove async_trait, convert DiagHandler impl to inherent me…
arvindr19 Apr 27, 2026
fec3891
fix: address remaining PR #11 review comments
arvindr19 Apr 24, 2026
94e1f4f
feat: add proxy-doip crate — DoIP transport layer (temporary, RDBI/WD…
arvindr19 Apr 22, 2026
24cb89b
fix: add Send + Sync bounds to DiagHandler usage in proxy-doip server…
arvindr19 Apr 24, 2026
9f27397
refactor: replace Arc<dyn DiagHandler> with Arc<SovdDiagHandler> in p…
arvindr19 Apr 27, 2026
5675d95
refactor: address review comments for proxy-doip
arvindr19 Apr 30, 2026
5893b0b
fix: restore correct diag_handler after rebase
arvindr19 Apr 30, 2026
b118a14
fix: address review comments for proxy-doip
arvindr19 May 12, 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
3,321 changes: 3,320 additions & 1 deletion Cargo.lock

Large diffs are not rendered by default.

46 changes: 42 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,46 @@
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0

[package]
name = "uds2sovd-proxy"
[workspace.package]
version = "0.1.0"
edition = "2024"
license = "Apache-2.0"
homepage = "https://github.com/eclipse-opensovd/uds2sovd-proxy"

[lints]
workspace = true
[workspace]
resolver = "3"
members = [
"proxy-core",
"proxy-sovd",
"proxy-doip",
]

[workspace.dependencies]
proxy-core = { path = "proxy-core" }
proxy-doip = { path = "proxy-doip" }
proxy-sovd = { path = "proxy-sovd" }
cda-core = { git = "https://github.com/eclipse-opensovd/classic-diagnostic-adapter.git", rev = "cf7fd9c18a7c49467e9e6c9ceae1e771c613e49b" }
cda-database = { git = "https://github.com/eclipse-opensovd/classic-diagnostic-adapter.git", rev = "cf7fd9c18a7c49467e9e6c9ceae1e771c613e49b" }
cda-interfaces = { git = "https://github.com/eclipse-opensovd/classic-diagnostic-adapter.git", rev = "cf7fd9c18a7c49467e9e6c9ceae1e771c613e49b" }
cda-plugin-security = { git = "https://github.com/eclipse-opensovd/classic-diagnostic-adapter.git", rev = "cf7fd9c18a7c49467e9e6c9ceae1e771c613e49b" }

# ---- common crates ----
async-trait = "0.1.89"
thiserror = "2.0.17"
serde = "1.0"
serde_json = "1.0"
tokio = { version = "1.48.0", default-features = false }
bytes = "1"
clap = "4.6.1"
toml = "0.9.8"

# ---- networking crates ----
reqwest = { version = "0.12.24", default-features = false }
url = { version = "2", features = ["serde"] }

# ---- tracing & logging crates ----
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.20", default-features = false }

# Lints are aligned with shared-lints.toml from:
# https://github.com/eclipse-opensovd/cicd-workflows/tree/main/shared-lints
Expand Down Expand Up @@ -44,3 +75,10 @@ clone_on_ref_ptr = "warn"
# enforce that the type suffix of a literal is always appended directly
# eg. 12u8 instead of 12_u8
separated_literal_suffix = "deny"

[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] }

[patch.crates-io]
aide = { git = "https://github.com/alexmohr/aide.git", rev = "56355cb" }
flatbuffers = { git = "https://github.com/alexmohr/flatbuffers.git", rev = "0ba3307d" }
78 changes: 75 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,92 @@ SOVD-enabled vehicle architectures without modification.
- 🛡️ safe & secure
- ⚡ fast startup

## introduction
## features

### usage
- **MDD-Agnostic**: Works with any valid MDD file
- **DoIP Server**: ISO 13400-2 compliant, port configurable (default: `13400`)
- **SOVD Mapping**: UDS ↔ SOVD REST API conversion
- **Mock Gateway**: Built-in SOVD mock responses for testing
- **Service Resolution**: DID → service mapping via MDD (MUX map or brute-force)

### prerequisites
## prerequisites

To run the proxy you will need at least one `MDD` file. Check out [eclipse-opensovd/odx-converter](https://github.com/eclipse-opensovd/odx-converter) on how to create `MDD`(s) from ODX.

Sample ODX/MDD files are available in the CDA repository: [testcontainer/odx](https://github.com/eclipse-opensovd/classic-diagnostic-adapter/tree/main/testcontainer/odx)

Once you have the `MDD`(s) you can place them in `testcontainer/mdd/` or pass the path via `--mdd-dir`.

### build the executable

```shell
cargo build --release
```

### running

Ensure that the config (`examples/config.toml`) fits your setup:

- `doip_port` is set to the desired DoIP server port (default: `13400`)
- `gateway_url` points to the SOVD gateway (CDA or mock)
- `mock_gateway = true` enables built-in mock responses for testing without a real CDA

Run the proxy:

```shell
cargo run --release -- --mdd-dir testcontainer/mdd
```

Or with a specific MDD file:

```shell
cargo run --release -- --mdd-file FLXC1000.mdd
```

### running with SOVD Server

To use the proxy with a real SOVD Server instance, set `mock_gateway = false` in `examples/config.toml` and point `gateway_url` to the SOVD Server endpoint.

## architecture

```
DoIP Client (port 13400)
↓ UDS request (0x22 DID)
Proxy (service resolution via MDD)
↓ SOVD REST (GET /data/vindataidentifier_read)
Mock Gateway OR Real SOVD Server
↓ SOVD JSON response
Proxy (MDD-based UDS encoding)
↓ UDS response (0x62 DID data)
DoIP Client
```

## directory structure

- `proxy-core/`: Shared types, errors, MDD engine, and `DiagHandler` trait
- `proxy-doip/`: DoIP transport layer (ISO 13400-2) — server and session handling
- `proxy-sovd/`: SOVD REST client and UDS ↔ SOVD mapping
- `proxy-main/`: Binary entry point, CLI, configuration, and example clients
- `testcontainer/mdd/`: MDD files (FLXC1000.mdd)
- `proxy-main/examples/`: Test clients for each MDD

## configuration

Edit `examples/config.toml`:

- `doip_port = 13_400`: DoIP server port
- `mock_gateway = true`: Use built-in mock responses
- `gateway_url`: SOVD gateway endpoint
- MDD directory: `--mdd-dir testcontainer/mdd` (default)

## developing

### pre commit

```shell
uv run https://raw.githubusercontent.com/eclipse-opensovd/cicd-workflows/main/run_checks.py
```

### codestyle

see [codestyle](CODESTYLE.md)
Expand All @@ -58,6 +128,7 @@ see [codestyle](CODESTYLE.md)
#### unit tests

Unittests are placed in the relevant module as usual in rust:

```rust
...
#[cfg(test)]
Expand All @@ -67,6 +138,7 @@ mod test {
```

Run unit tests with:

```shell
cargo test --locked --lib
```
Expand Down
20 changes: 17 additions & 3 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
all-features = false
no-default-features = false


[output]
feature-depth = 1


# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
ignore = []
ignore = ["RUSTSEC-2023-0071"]


# This section is considered when running `cargo deny check licenses`
# More documentation for the licenses section can be found here:
Expand All @@ -32,15 +35,24 @@ ignore = []
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
allow = ["Apache-2.0", "MIT"]

allow = [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"Zlib",
"ISC",
"Unicode-3.0",
"CDLA-Permissive-2.0",
]
confidence-threshold = 0.9
exceptions = []


[licenses.private]
ignore = true
registries = []


# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
Expand All @@ -57,6 +69,7 @@ deny = []
skip = []
skip-tree = []


# This section is considered when running `cargo deny check sources`.
# More documentation about the 'sources' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
Expand All @@ -72,6 +85,7 @@ allow-git = [
"https://github.com/alexmohr/flatbuffers.git",
]


[sources.allow-org]
github = []
gitlab = []
Expand Down
Loading
Loading