Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 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
629276e
fix: parsing cli, used clap and url crate
arvindr19 May 7, 2026
246dfb8
refactor: encapsulate ServiceResolver internals behind facade methods
arvindr19 May 12, 2026
9ee9c55
refactor: address review comments for service_parsing
arvindr19 Apr 30, 2026
fbdf246
feat: add proxy-sovd crate with SOVD REST client and UDS<->SOVD mapper
arvindr19 Apr 22, 2026
e129131
fix: update diag_handler to use ResolvedService struct
arvindr19 Apr 24, 2026
f0060db
refactor: remove async_trait, convert DiagHandler impl to inherent me…
arvindr19 Apr 27, 2026
6beac40
Fix: self review
arvindr19 Apr 28, 2026
1853c0c
Fix: address review comments
arvindr19 Apr 29, 2026
2eabdfc
refactor: address review comments for proxy-sovd
arvindr19 Apr 30, 2026
6d56e00
fix: address review comments for proxy-sovd
arvindr19 May 7, 2026
4fa5aef
fix: address review comments for proxy-sovd
arvindr19 May 12, 2026
8aba2e8
refactor: address review comments for service_parsing
arvindr19 Apr 30, 2026
8c36dc6
feat: add proxy-sovd crate with SOVD REST client and UDS<->SOVD mapper
arvindr19 Apr 22, 2026
e31b571
refactor: remove async_trait, convert DiagHandler impl to inherent me…
arvindr19 Apr 27, 2026
7a7dbf2
fix: address remaining PR #11 review comments
arvindr19 Apr 24, 2026
07d95f9
feat: add proxy-doip crate — DoIP transport layer (temporary, RDBI/WD…
arvindr19 Apr 22, 2026
1345c43
fix: add Send + Sync bounds to DiagHandler usage in proxy-doip server…
arvindr19 Apr 24, 2026
17a84aa
refactor: replace Arc<dyn DiagHandler> with Arc<SovdDiagHandler> in p…
arvindr19 Apr 27, 2026
e48125c
refactor: address review comments for proxy-doip
arvindr19 Apr 30, 2026
0dad30e
fix: restore correct diag_handler after rebase
arvindr19 Apr 30, 2026
ced9682
fix: restore correct proxy-sovd files after rebase
arvindr19 May 12, 2026
efbb1a6
refactor: address review comments for service_parsing
arvindr19 Apr 30, 2026
36cc61f
feat: add proxy-sovd crate with SOVD REST client and UDS<->SOVD mapper
arvindr19 Apr 22, 2026
322f00f
feat: add proxy-sovd crate with SOVD REST client and UDS<->SOVD mapper
arvindr19 Apr 22, 2026
daaebc3
refactor: remove async_trait, convert DiagHandler impl to inherent me…
arvindr19 Apr 27, 2026
2753fda
refactor: remove async_trait, convert DiagHandler impl to inherent me…
arvindr19 Apr 27, 2026
9a653dc
refactor: replace Arc<dyn DiagHandler> with Arc<SovdDiagHandler> in p…
arvindr19 Apr 27, 2026
8cbf781
feat: add proxy-main binary, FLXC1000 test client, and updated README
arvindr19 Apr 22, 2026
8e7e152
fix: remove obsolete config.validate() call in proxy-main
arvindr19 Apr 24, 2026
4af140f
fix: proper NRC mapping for SOVD errors; accept NRC 0x22 in FLXC1000 …
arvindr19 Apr 24, 2026
56b6f9c
fix: use config/config.toml as default config path; revert NRC workar…
arvindr19 Apr 24, 2026
11169ef
refactor: update proxy-main after DiagHandler removal
arvindr19 Apr 27, 2026
aed5180
refactor: address review comments for proxy-main
arvindr19 Apr 30, 2026
d6ab575
fix: address review comments for config
arvindr19 May 7, 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,409 changes: 3,408 additions & 1 deletion Cargo.lock

Large diffs are not rendered by default.

47 changes: 43 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,47 @@
# 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",
"proxy-main",
]

[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 +76,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
37 changes: 37 additions & 0 deletions config/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS)
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0

[server]
doip_port = 13_400
bind_address = "0.0.0.0"
max_connections = 10
source_address = 3_712


[sovd]
gateway_url = "http://localhost:20002"
client_id = "uds2sovd_proxy"
client_secret = "test_secret"
timeout_ms = 5_000
mock_gateway = true
include_schema = false
api_version = "v15"


[ecu]
default_name = "AUTO_DETECT"
logical_address = 1
eid = [0, 1, 2, 3, 4, 5]
gid = [0, 1, 2, 3, 4, 5]


[logging]
level = "debug"
format = "pretty"
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