fixed sysctl no ipv6

This commit is contained in:
dperegudov
2026-09-24 02:02:17 +03:00
parent fe3ebbe593
commit 482860a4a1
3 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ PersistentKeepalive = 25
SOCKS5 без авторизации (создаётся только тот инпут, чей конфиг добавлен):
- WARP — `localhost:2080`
- Proton — `0.0.0.0:3080`
- Proton — `localhost:3080`
```none
curl --proxy socks5://localhost:2080 ip-api.com # через WARP
+2 -1
View File
@@ -606,6 +606,7 @@ WARPEOF
{
"type": "mixed",
"tag": "$WARP_IN_TAG",
"listen": "127.0.0.1",
"listen_port": 2080
}
WARPEOF
@@ -653,7 +654,7 @@ PROTONEOF
{
"type": "mixed",
"tag": "proton-in",
"listen": "0.0.0.0",
"listen": "127.0.0.1",
"listen_port": 3080
}
PROTONEOF
+11 -6
View File
@@ -405,11 +405,16 @@ WantedBy=multi-user.target
'SERVICE_EOF'
echo "Configuring sysctl parameters..."
cat > /etc/sysctl.d/99-sing-box-warp.conf <<EOF
net.ipv4.conf.all.src_valid_mark=1
net.ipv6.conf.all.disable_ipv6=0
net.ipv4.ip_forward=1
EOF
{
echo "net.ipv4.conf.all.src_valid_mark=1"
echo "net.ipv4.ip_forward=1"
if [ -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then
echo "net.ipv6.conf.all.disable_ipv6=0"
fi
} > /etc/sysctl.d/99-sing-box-warp.conf
if [ ! -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then
echo "IPv6 sysctl not available, skipping net.ipv6.conf.all.disable_ipv6."
fi
sysctl -p /etc/sysctl.d/99-sing-box-warp.conf
if [ "$ENABLE_TUN" = "1" ]; then
@@ -449,7 +454,7 @@ if [ "$ENABLE_WARP" -eq 1 ]; then
echo " WARP: localhost:2080"
fi
if [ "$ENABLE_PROTON" -eq 1 ]; then
echo " Proton: 0.0.0.0:3080"
echo " Proton: localhost:3080"
fi
echo " Default route for non-SOCKS traffic: $DEFAULT_ROUTE"
echo ""