portredirect 0.3.0

PortRedirect is a tool that bridges your frontend and backend by redirecting TCP connections through a persistent QUIC connection. It provides both a server (accepting TCP connections and forwarding them via QUIC) and a client (relaying QUIC streams to a TCP destination).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
check_command() {
    if ! command -v "$1" >/dev/null 2>&1; then
        echo "$1 not found. Please install it."
        exit 1
    fi
}

get_metrics() {
    # Get metrics from portredirect client
    # Uses -i to include the HTTP response headers in the output,
    # so we have at least some output when the metrics are empty.
    curl -i http://localhost:9898/metrics -o "${1:-metrics.log}"
}