5 Commits

Author SHA1 Message Date
HystericalDragon
297d64e48f
chore: format code 2024-04-05 11:26:22 +08:00
Haruue
e1d7ce4640
chore: a better fix for 32-bit unix.Timeval
Why there is no decltype() in Golang?

At least we got generics now.

ref: 9520d840942d3950ed43af281935c262fac35615
2024-04-05 10:49:03 +08:00
HystericalDragon
9520d84094
fix: timeval in different arch
Signed-off-by: HystericalDragon <HystericalDragons@proton.me>
2024-04-05 09:57:45 +08:00
HystericalDragon
13586df2ba
fix: invalid const usage
Signed-off-by: HystericalDragon <HystericalDragons@proton.me>
2024-04-05 08:36:04 +08:00
Haruue
3e34da1aa8
refactor: protect => quic.sockopts
Android's VpnService.protect() itself is confusing, so we rename the
"protect" feature with the name `fdControlUnixSocket` and make it a
sub-option under `quic.sockopts`.

A unit test is added to make sure the protect feature works.

I also added two other common options to `quic.sockopts` that I copied
from my other projects but did not fully test here.
2024-04-05 02:20:45 +08:00