istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/hbone/README.md (about) 1 # HTTP Based Overlay Network (HBONE) 2 3 HTTP Based Overlay Network (HBONE) is the protocol used by Istio for communication between workloads in the mesh. 4 At a high level, the protocol consists of tunneling TCP connections over HTTP/2 CONNECT, over mTLS. 5 6 ## Specification 7 8 TODO 9 10 ## Implementations 11 12 ### Clients 13 14 #### CLI 15 16 A CLI client is available using the `client` binary. 17 18 Usage examples: 19 20 ```shell 21 go install ./pkg/test/echo/cmd/client 22 # Send request to 127.0.0.1:8080 (Note only IPs are supported) via an HBONE proxy on port 15008 23 client --hbone-client-cert tests/testdata/certs/cert.crt --hbone-client-key tests/testdata/certs/cert.key \ 24 http://127.0.0.1:8080 \ 25 --hbone 127.0.0.1:15008 26 ``` 27 28 #### Golang 29 30 An (unstable) library to make HBONE connections is available at `pkg/hbone`. 31 32 Usage example: 33 34 ```go 35 d := hbone.NewDialer(hbone.Config{ 36 ProxyAddress: "1.2.3.4:15008", 37 Headers: map[string][]string{ 38 "some-addition-metadata": {"test-value"}, 39 }, 40 TLS: nil, // TLS is strongly recommended in real world 41 }) 42 client, _ := d.Dial("tcp", testAddr) 43 client.Write([]byte("hello world")) 44 ``` 45 46 ### Server 47 48 #### Server CLI 49 50 A CLI client is available using the `server` binary. 51 52 Usage examples: 53 54 ```shell 55 go install ./pkg/test/echo/cmd/server 56 # Serve on port 15008 (default) with TLS 57 server --tls 15008 --crt tests/testdata/certs/cert.crt --key tests/testdata/certs/cert.key 58 ``` 59 60 #### Server Golang Library 61 62 An (unstable) library to run an HBONE server is available at `pkg/hbone`. 63 64 Usage example: 65 66 ```go 67 s := hbone.NewServer() 68 // TLS is strongly recommended in real world 69 l, _ := net.Listen("tcp", "0.0.0.0:15008") 70 s.Serve(l) 71 ```