fix: multiple fixes + cleanup and formatting

This commit is contained in:
FUFSoB committed 2026-09-17 22:51:31 +05:00
1 parent 321e9ca468
commit c62000821a
59 files changed
+1357 -920

No files matched your search

+9 -9
View File
@@ -10,15 +10,15 @@
sing-box.overrideAttrs (old: {
postConfigure = (old.postConfigure or "") + ''
tun=vendor/github.com/sagernet/sing-tun
chmod -R u+w "$tun"
cp ${./patches/sing-tun-netlink-groups-probe.go} "$tun/monitor_linux_groups_probe.go"
substituteInPlace "$tun/monitor_linux.go" --replace-fail \
'func NewNetworkUpdateMonitor(logger logger.Logger) (NetworkUpdateMonitor, error) {' \
'func NewNetworkUpdateMonitor(logger logger.Logger) (NetworkUpdateMonitor, error) {
if netlinkGroupsBanned() {
return nil, ErrNetlinkBanned
}'
tun=vendor/github.com/sagernet/sing-tun
chmod -R u+w "$tun"
cp ${./patches/sing-tun-netlink-groups-probe.go} "$tun/monitor_linux_groups_probe.go"
substituteInPlace "$tun/monitor_linux.go" --replace-fail \
'func NewNetworkUpdateMonitor(logger logger.Logger) (NetworkUpdateMonitor, error) {' \
'func NewNetworkUpdateMonitor(logger logger.Logger) (NetworkUpdateMonitor, error) {
if netlinkGroupsBanned() {
return nil, ErrNetlinkBanned
}'
'';
passthru = (old.passthru or { }) // {
rootlessNetlink = true;