example: correct the default value for server_host_override (#4407)

This commit is contained in:
Zeke Lu 2021-05-15 05:09:26 +08:00 committed by GitHub
parent b759b408e8
commit 50c071e9b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -42,8 +42,8 @@ configure TLS and create the server credential using
On client side, we provide the path to the "ca_cert.pem" to configure TLS and create
the client credential using
[`credentials.NewClientTLSFromFile`](https://godoc.org/google.golang.org/grpc/credentials#NewClientTLSFromFile).
Note that we override the server name with "x.test.youtube.com", as the server
certificate is valid for *.test.youtube.com but not localhost. It is solely for
Note that we override the server name with "x.test.example.com", as the server
certificate is valid for *.test.example.com but not localhost. It is solely for
the convenience of making an example.
Once the credentials have been created at both sides, we can start the server

View File

@ -40,7 +40,7 @@ var (
tls = flag.Bool("tls", false, "Connection uses TLS if true, else plain TCP")
caFile = flag.String("ca_file", "", "The file containing the CA root cert file")
serverAddr = flag.String("server_addr", "localhost:10000", "The server address in the format of host:port")
serverHostOverride = flag.String("server_host_override", "x.test.youtube.com", "The server name used to verify the hostname returned by the TLS handshake")
serverHostOverride = flag.String("server_host_override", "x.test.example.com", "The server name used to verify the hostname returned by the TLS handshake")
)
// printFeature gets the feature for the given point.