robert@simplystream
CDCloudflare Developers
•Created by robert@simplystream on 8/28/2024 in #workers-help
Can we do this with tcp connect?
Currently, I have to have a nodejs server that makes this connection, and I use cloudflare to proxy my websocket to this machine. It'd be ideal if Icould make this connection directly from inside cloudflare workers, but I do see the ability to set the servername and alpn protocols.
const targetTCPSocket = tls.connect({
host: 'url',
port: 443,
rejectUnauthorized: true, // Enable certificate validation
ALPNProtocols: ['h2', 'http/1.1'],
minVersion: 'TLSv1.3',
maxVersion: 'TLSv1.3',
servername: 'url',
});
2 replies