Skip to content

Instantly share code, notes, and snippets.

View sandromello's full-sized avatar

Sandro Mello sandromello

View GitHub Profile
@sandromello
sandromello / troubleshooting-1.md
Last active November 18, 2026 16:22
troubleshooting-1.md

Plain-relay launch test

This test runs one launch of the protected desktop through a plain TCP relay (socat) that replaces the Hoop Sidecar on the same VM, IP and port.

Nothing changes in Citrix or the NetScaler. The launch is captured in full on the Hoop VM. Comparing it with the Sidecar launches we already have shows where the Sidecar's traffic differs from a plain relay.

The test takes about 15 minutes. You only capture and send back; we analyze the results.

Before you start

cat > /etc/hoop/sidecar/config.yaml <<'EOF'
log_level: info
admin:
listen: 127.0.0.1:19000
audit:
file: /var/log/hoop/sidecar-audit.jsonl
ica:
@sandromello
sandromello / ca.crt
Created November 13, 2026 18:16
ca.crt
-----BEGIN CERTIFICATE-----
MIIEYjCCAsqgAwIBAgIUHeNYPpAXMIUCF3g5KyW7c1EWnH0wDQYJKoZIhvcNAQEL
BQAwNzEVMBMGA1UECgwMSG9vcCBJQ0EgTGFiMR4wHAYDVQQDDBVJQ0EgTGFiIEF6
dXJlIFJvb3QgQ0EwHhcNMjYwOTEwMTM0OTU5WhcNMzYwOTA3MTM0OTU5WjA3MRUw
EwYDVQQKDAxIb29wIElDQSBMYWIxHjAcBgNVBAMMFUlDQSBMYWIgQXp1cmUgUm9v
dCBDQTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAIQxjtDLdtlKsKb5
GUZNVW4ZIt8MEdcY2sFYld4+pRk8cJCLMl95G6RRRVRetHsHa2bfJglKEtpUnCD4
p34JiseocSE2wJ6813j8TQ1U+DiRhfEwTB2/AShv+lUgDUx8Odpv2Tp9nRmK7WXv
x+fR/w2Vd1DBBpzNpgQzMVPUm5BmfFLmHVteT+azQojrSbSPQ/oHMLQwmjW+b/7A
cDXKKUG7aKZQ8glJLXrSidDqzLse2EjgrXQvsDTBwT/S6i0s7Z0s7fbk2rx9Lnb4
@sandromello
sandromello / sidecar.nft
Created October 29, 2026 15:48
Config NfTables
cat > /etc/nftables.d/hoop-sidecar.nft <<'EOF'
define SNIP = <NETSCALER_SNIP>
define VDAS = <PROTECTED_VDA_CIDR>
table inet hoop_sidecar {
chain prerouting {
type filter hook prerouting priority mangle; policy accept;
meta l4proto tcp socket transparent 1 meta mark set 1 accept
ip saddr $SNIP ip daddr $VDAS tcp dport 2598 counter tproxy ip to :2598 meta mark set 1 accept
ip saddr $SNIP ip daddr $VDAS counter drop
@sandromello
sandromello / config.yaml
Last active October 29, 2026 15:25
working-config.yaml
log_level: info
admin:
listen: 127.0.0.1:19000
audit:
file: /var/log/hoop/sidecar-audit.jsonl
ica:
ocr_worker: /opt/hoop/active/sidecar/ica/bin/hoop-tesseract-worker
@sandromello
sandromello / Gateway-HttpRoute-Guide.md.md
Created May 21, 2026 13:33
Gateway-HttpRoute-Guide.md

Hoop Gateway Helm Chart

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.x
  • A running PostgreSQL instance

Installation

@sandromello
sandromello / curl-presidio-v2.sh
Last active April 13, 2026 18:52
curl-presidio.sh
time curl -X POST http://presidio-analyzer:3000/analyze -H "Content-Type: application/json" -d @-<<EOF
{
"language": "en",
"entities": [
"DATE_TIME"
],
"text": "john.doe@hoop.dev\tJohn Doe\t+5511959606844\tjohndoe.com\t192.168.5.10\tNew York\t1990-04-15\t123.456.789-00\tAB123456\t1234 5678 9012 3456\t123\t2027-08\tBank Of America\tDE89 3704 0044 0532 0130 00\t12345-6\tMale\tAmerican\tSoftware Engineer\tHoop Technologies\tFifth Avenue, 123\t04538-132\tGA\tBrazil\t192.168.5.10 john.doe@hoop.dev\tJohn Doe\t+5511959606844\tjohndoe.com\t192.168.5.10\tNew York\t1990-04-15\t123.456.789-00\tAB123456\t1234 5678 9012 3456\t123\t2027-08\tBank Of America\tDE89 3704 0044 0532 0130 00\t12345-6\tMale\tAmerican\tSoftware Engineer\tHoop Technologies\tFifth Avenue, 123\t04538-132\tGA United States 192.168.5.10 john.doe@hoop.dev\tJohn Doe\t+5511959606844\tjohndoe.com\t192.168.5.10\tNew York\t1990-04-15\t123.456.789-00\tAB123456\t1234 5678 9012 3456\t123\t2027-08\tBank Of America\tDE89 3704 0044 0532 0130 00\t1234
@sandromello
sandromello / jump-host-script.sh
Created September 22, 2025 21:36
jump-host-script.sh
#!/bin/bash
set -eo pipefail
LINUX_TARGET_USER=
while IFS= read -r line; do
[ -z "$line" ] && continue
USER_EMAIL=$(echo -n $line | awk '{print $1}')
if [ $USER_EMAIL == "$HOOP_USER_EMAIL" ]; then
LINUX_USER=$(echo -n $line | awk '{print $2}')
config:
POSTGRES_DB_URI: 'postgres://root:default-pwd@hoopgateway-pg/postgres?sslmode=disable'
API_URL: http://localhost:8009
defaultAgent:
enabled: true
postgres:
enabled: true
storageClassName: gp2
@sandromello
sandromello / hoopgateway-values.yml
Created September 10, 2025 12:38
hoopgateway-values-host-mount.yml
config:
POSTGRES_DB_URI: 'postgres://root:default-pwd@hoopgateway-pg/postgres?sslmode=disable'
API_URL: http://localhost:8009
defaultAgent:
enabled: true
postgres:
enabled: true