leaf icon indicating copy to clipboard operation
leaf copied to clipboard

bind syscall

Open ibigbug opened this issue 2 years ago • 2 comments

https://github.com/eycorsican/leaf/blob/897ea054f0f6691bc817d2dcb2e08d7633cfcde6/leaf/src/proxy/mod.rs#L355

没太看懂这个地方在 connect 之前为什么要 bind 一下?

UDP 的处理也是同样的。

ref: https://man7.org/linux/man-pages/man2/bind.2.html

而且有些(例如 iOS)平台 bind 0.0.0.0 会报错

ibigbug avatar May 24 '22 09:05 ibigbug

我看到控制台输出 确实会bind 0.0.0.0 ,我目前还是连不上,不知道什么问题

maybeliu avatar Sep 27 '23 04:09 maybeliu

在某些平台上会bind到某个特定的网络接口以绕过TUN,https://github.com/eycorsican/leaf/blob/897ea054f0f6691bc817d2dcb2e08d7633cfcde6/leaf/src/proxy/mod.rs#L203C18-L203C18

如果出错了可以把详细信息贴出来,分开处理一下。

eycorsican avatar Sep 27 '23 14:09 eycorsican