This demo showcases Orion's TLV (Type-Length-Value) listener filter implementation, compatible with Kmesh configurations.
Run the automated test script:
./test_tlv_config.shThis script:
- Validates Orion configuration loading
- Tests TLV filter integration
- Optionally tests end-to-end packet processing (if client is available)
The TLV filter is configured in orion-config.yaml:
listeners:
- name: tlv_demo_listener
address: 0.0.0.0:9000
filter_chains:
- filters:
- name: envoy.listener.kmesh_tlv
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.listener.kmesh_tlv.v3.KmeshTlv../../target/debug/orion -c orion-config.yamlrustc send_tlv.rs -o send_tlv
./send_tlv <ip> <port>The client constructs TLV packets containing original destination information and sends them to the Orion listener for testing the filter's TLV processing capabilities.
The included Rust client (send_tlv.rs) is used for testing the TLV filter:
- Purpose: Constructs and sends TLV packets to test the filter's processing
- Functionality: Encodes original destination IP/port in TLV format and sends to Orion listener
- Usage: Compile with
rustc send_tlv.rs -o send_tlvthen run./send_tlv <ip> <port> - Protocol: Supports both IPv4 and IPv6 addresses in TLV packets
syntax = "proto3";
package envoy.extensions.filters.listener.kmesh_tlv.v3;
message KmeshTlv {}- Filter Name:
envoy.listener.kmesh_tlv - Type URL:
type.googleapis.com/envoy.extensions.filters.listener.kmesh_tlv.v3.KmeshTlv
- TLV_TYPE_SERVICE_ADDRESS (0x1): Service address information
- TLV_TYPE_ENDING (0xfe): End marker
- Maximum TLV Length: 256 bytes
Client → Orion Listener → TLV Filter → Filter Chains → Backend
↓
TLV Processing
(Extract original destination)
Fully compatible with Kmesh project configurations using identical protobuf package names and TypedStruct configuration pattern.