klzgrad / naiveproxy

Make a fortune quietly
BSD 3-Clause "New" or "Revised" License
6.68k stars 884 forks source link

ERR_NOT_IMPLEMENTED in asuswrt-merlin AC68U #659

Closed harnnless closed 3 months ago

harnnless commented 3 months ago

Versions after v122.0.6261.43-1 report errors when running on ASUS AC68U (openwrt-arm_cortex-a9-static):

Failed to listen on xxxxxxx: ERR_NOT_IMPLEMENTED

Probably doesn't support this: Enable SO_REUSEPORT on Linux server sockets.

Can I ask if it can be enabled only when the configuration needs to reuse ports? Or is there another solution?

klzgrad commented 3 months ago

https://github.com/klzgrad/naiveproxy/releases/tag/v126.0.6478.40-2

?

Chilledheart commented 3 months ago

SO_REUSEPORT is a user-facing API. It's not likely that it was disabled.

please take a look at similar issue reported on openwrt 21

https://github.com/openwrt/packages/issues/16922#issuecomment-946503598

klzgrad commented 3 months ago

There is no kernel config to disable SO_REUSEPORT but in the case of ASUS AC68U (openwrt-arm_cortex-a9-static) it may be some Asus Merlin ancient kernel before 3.9 that did not have SO_REUSEPORT.

I cannot reproduce the reported behavior. But it makes sense to fall back to not using SO_REUSEPORT if it is not available, as Chromium already does it this way for UDP socket.