edgetunnel icon indicating copy to clipboard operation
edgetunnel copied to clipboard

Why don't handle source port and destination port?

Open fwqaaq opened this issue 1 year ago • 4 comments

https://github.com/zizifn/edgetunnel/blob/4221293b0abd63cc139adb24f0e707548e488dfb/src/worker-vless.js#L540-L548

Complete UDP messge also includes source port and destination port(total 8 bytes), but it seems they are being ignored in here.

fwqaaq avatar Apr 17 '24 03:04 fwqaaq

Port and destination is in vless header. And worker runtime not support udp yet.

zizifn avatar Apr 17 '24 03:04 zizifn

Port and destination is in vless header. And worker runtime not support udp yet.

So vless sends UDP datas after processing, thus it also lacks a checksum?

fwqaaq avatar Apr 17 '24 03:04 fwqaaq

and no need to use DOH, because some public dns like google 8.8.8.8 open a tcp port 53 to handle dns request, so handleTCPOutBound could handle dns.

xqdoo00o avatar Apr 17 '24 16:04 xqdoo00o

I think in vless format, every udp chunk has a vless header, like tcp chunk. source code. so maybe it's not necessory to set udpStreamWrite. and no need to use DOH, because some public dns like google 8.8.8.8 open a tcp port 53 to handle dns request, so handleTCPOutBound could handle dns.

You are right. In the init implementation, I used 8.8.8.8 for dns, but change to cf doh for speed.

zizifn avatar Apr 21 '24 15:04 zizifn