# domenicoverde/connect-eth-go architecture

> Architecture diagram of the GitHub repository domenicoverde/connect-eth-go, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/domenicoverde/connect-eth-go
- Repository: https://github.com/domenicoverde/connect-eth-go

## Overview

connect-eth-go is a Go library for establishing Ethernet-over-HTTP/3 tunnels using CONNECT-ETHERNET. The client opens a tunnel with Dial; a server-side integration parses a request, then Proxy establishes the tunnel, and Conn handles Ethernet frames over the HTTP/3 stream. The README also documents remote-access and site-to-site L2 VPN use, plus transparent VLAN forwarding. The sampled source shows the client and proxy creating Conn instances, but not the application-level server routing that connects request parsing to proxying.

Main entry points: [`conn.go`](https://github.com/domenicoverde/connect-eth-go/blob/main/conn.go) (Frame connection), [`client.go`](https://github.com/domenicoverde/connect-eth-go/blob/main/client.go) (Open tunnel), [`proxy.go`](https://github.com/domenicoverde/connect-eth-go/blob/main/proxy.go) (Establish tunnel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client API"]
  node_dial["Open tunnel<br/>[client.go]"]
end

subgraph group_server["Server API"]
  node_parse["Parse request<br/>[request.go]"]
  node_proxy["Establish tunnel<br/>[proxy.go]"]
end

subgraph group_transport["Tunnel transport"]
  node_conn["Frame connection<br/>[conn.go]"]
end

node_app(("Client application"))
node_ethernet(("Ethernet segment"))
node_peer(("HTTP/3 peer"))

node_app -->|"calls Dial"| node_dial
node_dial -->|"creates"| node_conn
node_proxy -->|"creates"| node_conn
node_ethernet -->|"frames read/written"| node_conn
node_conn -->|"tunnels frames"| node_peer
node_peer -->|"tunnels frames"| node_conn

click node_dial "https://github.com/domenicoverde/connect-eth-go/blob/main/client.go"
click node_parse "https://github.com/domenicoverde/connect-eth-go/blob/main/request.go"
click node_proxy "https://github.com/domenicoverde/connect-eth-go/blob/main/proxy.go"
click node_conn "https://github.com/domenicoverde/connect-eth-go/blob/main/conn.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dial,node_app toneBlue
class node_parse,node_proxy toneAmber
class node_conn toneMint
class node_ethernet,node_peer toneIndigo
```

## Components

### Client API

- [Open tunnel](https://github.com/domenicoverde/connect-eth-go/blob/main/client.go): `client.go`

### Server API

- [Parse request](https://github.com/domenicoverde/connect-eth-go/blob/main/request.go): `request.go`
- [Establish tunnel](https://github.com/domenicoverde/connect-eth-go/blob/main/proxy.go): `proxy.go`

### Tunnel transport

- [Frame connection](https://github.com/domenicoverde/connect-eth-go/blob/main/conn.go): `conn.go`

### Other components

- **Client application**
- **Ethernet segment**
- **HTTP/3 peer**

## Connections

- Client application → Open tunnel: calls Dial (evidence: `client.go`)
- Open tunnel → Frame connection: creates (evidence: `client.go`)
- Establish tunnel → Frame connection: creates (evidence: `proxy.go`)
- Ethernet segment → Frame connection: frames read/written (evidence: `conn.go`)
- Frame connection → HTTP/3 peer: tunnels frames (evidence: `README.md`)
- HTTP/3 peer → Frame connection: tunnels frames (evidence: `README.md`)
