Skip to content

Commit 4a70d18

Browse files
committed
Rename example to "Envoy TCP Routing"
Rename tcp_rerouting to envoy_tcp_routing to: - Clearly indicate this is an Envoy-specific example - Use "routing" instead of "rerouting" for better terminology Changes: - Renamed directory: examples/tcp_rerouting → examples/envoy_tcp_routing - Updated package name: proxy-wasm-example-envoy-tcp-routing - Updated all references in README.md files - Updated Docker Compose network name and WASM filename - Updated Envoy config filter names and WASM path - Updated .gitignore path Signed-off-by: Christof Gerber <christof.gerber1@gmail.com>
1 parent 168a45c commit 4a70d18

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
target
33
Cargo.lock
44
# Generated protobuf code
5-
examples/tcp_rerouting/src/generated/
5+
examples/envoy_tcp_routing/src/generated/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- [HTTP Configuration](./examples/http_config/)
2424
- [gRPC Auth (random)](./examples/grpc_auth_random/)
2525
- [Envoy filter metadata](./examples/envoy_filter_metadata/)
26-
- [TCP Rerouting](./examples/tcp_rerouting/)
26+
- [Envoy TCP Routing](./examples/envoy_tcp_routing/)
2727

2828
## Articles & blog posts from the community
2929

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
publish = false
3-
name = "proxy-wasm-example-tcp-rerouting"
3+
name = "proxy-wasm-example-envoy-tcp-routing"
44
version = "0.0.1"
55
authors = ["Proxy-Wasm contributors"]
6-
description = "Proxy-Wasm plugin example: TCP Rerouting based on source IP"
6+
description = "Proxy-Wasm plugin example: Envoy TCP Routing based on source IP"
77
license = "Apache-2.0"
88
edition = "2021"
99

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Proxy-Wasm plugin example: TCP Rerouting
1+
## Proxy-Wasm plugin example: Envoy TCP Routing
22

33
Proxy-Wasm TCP filter that dynamically routes connections to different upstream clusters based on the source IP address.
44

@@ -42,10 +42,10 @@ In separate terminals, test the routing behavior with different source IP addres
4242

4343
```bash
4444
# Even IP (last octet 10) → routes to egress-router1
45-
docker run --rm -it --network tcp_rerouting_envoymesh --ip 172.22.0.10 curlimages/curl curl http://proxy:10000/ip -H "Host: httpbin.org"
45+
docker run --rm -it --network envoy_tcp_routing_envoymesh --ip 172.22.0.10 curlimages/curl curl http://proxy:10000/ip -H "Host: httpbin.org"
4646

4747
# Odd IP (last octet 11) → routes to egress-router2
48-
docker run --rm -it --network tcp_rerouting_envoymesh --ip 172.22.0.11 curlimages/curl curl http://proxy:10000/ip -H "Host: httpbin.org"
48+
docker run --rm -it --network envoy_tcp_routing_envoymesh --ip 172.22.0.11 curlimages/curl curl http://proxy:10000/ip -H "Host: httpbin.org"
4949
```
5050

5151
### Expected Output

examples/tcp_rerouting/docker-compose.yaml renamed to examples/envoy_tcp_routing/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
entrypoint: /usr/local/bin/envoy -c /etc/envoy.yaml -l info --service-cluster proxy
1919
volumes:
2020
- ./envoy/envoy.yaml:/etc/envoy.yaml
21-
- ./target/wasm32-wasip1/release/proxy_wasm_example_tcp_rerouting.wasm:/etc/tcp_rerouting.wasm
21+
- ./target/wasm32-wasip1/release/proxy_wasm_example_envoy_tcp_routing.wasm:/etc/envoy_tcp_routing.wasm
2222
networks:
2323
- envoymesh
2424
ports:

examples/tcp_rerouting/envoy/envoy.yaml renamed to examples/envoy_tcp_routing/envoy/envoy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ static_resources:
2727
typed_config:
2828
"@type": type.googleapis.com/envoy.extensions.filters.network.wasm.v3.Wasm
2929
config:
30-
name: tcp_rerouting_filter
31-
root_id: tcp_rerouting_filter
30+
name: envoy_tcp_routing_filter
31+
root_id: envoy_tcp_routing_filter
3232
configuration:
3333
"@type": type.googleapis.com/google.protobuf.StringValue
3434
value: "standalone"
3535
vm_config:
36-
vm_id: vm.tcp_rerouting
36+
vm_id: vm.envoy_tcp_routing
3737
runtime: envoy.wasm.runtime.v8
3838
code:
3939
local:
40-
filename: /etc/tcp_rerouting.wasm
40+
filename: /etc/envoy_tcp_routing.wasm
4141
allow_precompiled: true
4242
# TCP proxy filter
4343
- name: envoy.filters.network.tcp_proxy

examples/tcp_rerouting/src/set_envoy_filter_state.proto renamed to examples/envoy_tcp_routing/src/set_envoy_filter_state.proto

File renamed without changes.

0 commit comments

Comments
 (0)