add node vless (#95)

add node vless
This commit is contained in:
zizifn3
2023-01-19 23:50:16 +08:00
committed by GitHub
parent 26a65b5778
commit 620c57e602
27 changed files with 602 additions and 27 deletions

View File

@@ -0,0 +1,16 @@
import { serve } from 'https://deno.land/std@0.170.0/http/server.ts';
const handler = async (req: Request) => {
console.log('start');
const connect = await Deno.connect({
port: 443,
hostname: '2606:4700:0000:0000:0000:0000:6810:7c60',
});
console.log(connect.remoteAddr);
return new Response('hello', {
status: 200,
});
};
serve(handler, { port: 8081, hostname: '0.0.0.0' });

View File

@@ -29,7 +29,7 @@ const handler = async (req: Request): Promise<Response> => {
const { socket, response } = Deno.upgradeWebSocket(req);
socket.addEventListener('open', () => {});
let test: Deno.TcpConn | null = null;
// let test: Deno.TcpConn | null = null;
// test!.writable.abort();
//
processWebSocket({