mirror of
https://github.com/zizifn/edgetunnel
synced 2024-11-22 18:07:07 +00:00
620c57e602
add node vless
20 lines
367 B
JavaScript
20 lines
367 B
JavaScript
import { connect, Socket } from 'node:net';
|
|
import { Duplex } from 'node:stream';
|
|
import { WritableStream } from 'node:stream/web';
|
|
|
|
try {
|
|
const socket = connect(
|
|
{
|
|
port: '443',
|
|
host: 'www.google.com',
|
|
},
|
|
() => {
|
|
console.log('connect ', socket.readyState);
|
|
}
|
|
);
|
|
} catch (err) {
|
|
console.log('----', err);
|
|
}
|
|
|
|
console.log('end');
|