Skip to content

Instantly share code, notes, and snippets.

@njhsi
njhsi / ipset_linux.go
Created January 3, 2025 11:03
adguardhome nftables nftset support, instead of ipset
//go:build linux
package ipset
import (
"context"
"fmt"
"log/slog"
"net"
"strings"
@njhsi
njhsi / nfs-sec-krb5.init
Created November 28, 2022 23:47
patch openwrt nfs to enable mount option "-o sec=krb5", for kerberos secured nfs volume; added package of rpc.gssd in nfs-utils
#!/bin/sh /etc/rc.common
# Copyright (C) 2009 OpenWrt.org
START=60
USE_PROCD=1
start_service() {
[ -f /etc/krb5.keytab ] || return 1
mkdir -p /var/lib/nfs/rpc_pipefs
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
@njhsi
njhsi / v2ray-plugin_enable_reverse_tunnel.patch
Last active November 28, 2022 23:40
patch for v2ray-plugin to enable reverse port tunnel (server8000 -> client8000)
diff --git a/main.go b/main.go
index 2212ddf..1ecab32 100644
--- a/main.go
+++ b/main.go
@@ -19,6 +19,8 @@ import (
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/app/proxyman"
+ "v2ray.com/core/app/reverse"
+ "v2ray.com/core/app/router"