New SDK version 0.28.0 connect

Hello, I'm contacting you about the Node.js SDK on Windows. I successfully enrolled using the SDK and init.ziti, but whenever I try to connect to retrieve or send data, I get an error.

Knowing that my identity and the address I'm calling are correct.

Thanks in advance.

@dorianEliptec , thank you for the report

it would be really helpful to post sample code that demonstrates the issue you're seeing

Here is my code for the connection part

import ziti from './node_modules/@openziti/ziti-sdk-nodejs/ziti.js';
import http from 'node:http';

const IDENTITY_FILE = process.argv[2];
const URL = process.argv[3];

if (!IDENTITY_FILE || !URL) {
    console.error('Usage: node script.js <identity.json> <url>');
    process.exit(1);
}

try {
    await ziti.init(IDENTITY_FILE);

    http.get(URL,
        { agent: ziti.httpAgent() },
        (res) => {
            console.log(`http status code: ${res.statusCode} ${res.statusMessage}`);
            for (const k in res.headers) {
                const header = res.headers[k]
                console.log(`${k}: ${header}`);
            }

            res.on('data', (chunk) => {
                console.log(chunk.toString());
            }).on('end', () => ziti.ziti_shutdown());
        }).on('error', (err) => {
        console.error('Erreur:', err);
        process.exit(1);
    });
} catch (err) {
    console.error('Erreur init Ziti:', err);
    process.exit(1);
}

hello @ekoby do y have any news ? for my problem ?

thanks for the report @dorianEliptec

it is caused by nodejs internal handling of sockets which seems to be incompatible with Windows.

I am working on a workaround now

Good news, thanks. I’m eagerly awaiting this new version!