Skip to content

Conversation

@cirospaciari
Copy link
Member

@cirospaciari cirospaciari commented Jun 29, 2023

Depends on
Jarred-Sumner/uSockets#6 and on bump Jarred-Sumner/uWebSockets#16

  • Add C support
  • Add Zig wrappers
  • Change #socket to be a symbol
  • Add Tests

This will enable this to work:

import nodemailer from "nodemailer";
nodemailer.createTestAccount(async (err, account) => {
  const transporter = nodemailer.createTransport({
    host: account.smtp.host,
    port: account.smtp.port,
    secure: account.smtp.secure,
    debug: true,
    auth: {
      user: account.user, // generated ethereal user
      pass: account.pass, // generated ethereal password
    },
  });

  // send mail with defined transport object
  let info = await transporter.sendMail({
    from: '"Fred Foo 👻" <foo@example.com>', // sender address
    to: "example@gmail.com", // list of receivers
    subject: "Hello ✔", // Subject line
    text: "Hello world?", // plain text body
    html: "<b>Hello world?</b>", // html body
  });

  console.log("Message sent: %s", info.messageId);
  // Message sent: <b658f8ca-6296-ccf4-8306-87d57a0b4321@example.com>

  // Preview only available when sending through an Ethereal account
  console.log("Preview URL: %s", nodemailer.getTestMessageUrl(info));
  // Preview URL: https://ethereal.email/message/WaQKMgKddxQDoou...
});

Fix #3003 #3236

Also adds ALPNprotocols support, socket.alpnProtocol and socket.setServername support (edgeDB works after this)
Fixes setTimeout/setInterval/setImmediate keeping the process alive forever when returning a object on the callback

Fix #2915 #3009

@cirospaciari cirospaciari force-pushed the ciro/tls-socket-parameter branch from d0501e9 to 76cfa7e Compare June 29, 2023 20:59
@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2023

@cirospaciari 8 files with test failures on linux-x64:

  • test/cli/install/bun-run.test.ts
  • test/js/bun/websocket/websocket-server.test.ts
  • test/js/node/watch/fs.watch.test.js
  • test/js/third_party/nodemailer/nodemailer.test.ts
  • test/js/third_party/prisma/prisma.test.ts
  • test/js/third_party/socket.io/socket.io-close.test.ts
  • test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts
  • test/js/web/websocket/websocket.test.js

View test output

#8ac727557c6d81695412166e2922fbcc8eaa4045

@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2023

@cirospaciari 9 files with test failures on linux-x64-baseline:

  • test/cli/hot/hot.test.ts
  • test/cli/install/bun-run.test.ts
  • test/js/bun/websocket/websocket-server.test.ts
  • test/js/node/watch/fs.watch.test.js
  • test/js/third_party/nodemailer/nodemailer.test.ts
  • test/js/third_party/prisma/prisma.test.ts
  • test/js/third_party/socket.io/socket.io-close.test.ts
  • test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts
  • test/js/web/websocket/websocket.test.js

View test output

#8ac727557c6d81695412166e2922fbcc8eaa4045

@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2023

@cirospaciari 9 files with test failures on bun-darwin-aarch64:

  • test/cli/install/bun-run.test.ts
  • test/js/bun/net/socket.test.ts
  • test/js/bun/spawn/spawn.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/bun/websocket/websocket-server.test.ts
  • test/js/third_party/socket.io/socket.io-close.test.ts
  • test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts
  • test/js/web/fetch/fetch-leak.test.js
  • test/js/web/websocket/websocket.test.js

View test output

#8ac727557c6d81695412166e2922fbcc8eaa4045

@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2023

@cirospaciari 11 files with test failures on bun-darwin-x64-baseline:

  • test/cli/install/bun-run.test.ts
  • test/js/bun/spawn/spawn-streaming-stdin.test.ts
  • test/js/bun/spawn/spawn.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/bun/websocket/websocket-server.test.ts
  • test/js/third_party/nodemailer/nodemailer.test.ts
  • test/js/third_party/socket.io/socket.io-close.test.ts
  • test/js/third_party/socket.io/socket.io-connection-state-recovery.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/timers/setTimeout.test.js
  • test/js/web/websocket/websocket.test.js

View test output

#8ac727557c6d81695412166e2922fbcc8eaa4045

@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2023

prettier errors have been resolved. Thank you.

#8ac727557c6d81695412166e2922fbcc8eaa4045

@cirospaciari cirospaciari changed the title WIP: [tls] add socket parameter support [tls] add socket parameter support Jun 30, 2023
@cirospaciari cirospaciari force-pushed the ciro/tls-socket-parameter branch from ade6a08 to b9d3d9a Compare June 30, 2023 22:30
@cirospaciari cirospaciari force-pushed the ciro/tls-socket-parameter branch from 833d0cd to d4b6924 Compare July 2, 2023 16:49
@cirospaciari cirospaciari force-pushed the ciro/tls-socket-parameter branch 2 times, most recently from 6c10e42 to 3895c1b Compare July 3, 2023 01:31
@sidorares
Copy link

Tls.connect({ socket }) and tlsSocket.setServerName() should also enable mysql2 ssl database connection

@cirospaciari cirospaciari changed the title [tls] add socket parameter support [tls] add socket parameter, setServername and ALPNprotocols support Jul 3, 2023
@cirospaciari cirospaciari force-pushed the ciro/tls-socket-parameter branch from 234d1b3 to a34520d Compare July 3, 2023 13:03
@Jarred-Sumner Jarred-Sumner merged commit a7a01bd into main Jul 3, 2023
@Jarred-Sumner Jarred-Sumner deleted the ciro/tls-socket-parameter branch July 3, 2023 19:19
@Jarred-Sumner
Copy link
Collaborator

🎉

@rvitorgomes
Copy link

Congrats for the work!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nodemailer does not work Support self signed certificate

4 participants