mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-24 17:18:25 +08:00
16
apps/deno-vless/src/deno-test.ts
Normal file
16
apps/deno-vless/src/deno-test.ts
Normal 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' });
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user