1/2 mm-proxy

This commit is contained in:
2026-02-28 14:53:57 -06:00
parent 3e23a2d1b6
commit 04dee7a9cb
3 changed files with 42 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=go-mmproxy %i
After=mmproxy-routing.service
Wants=mmproxy-routing.service
[Service]
Type=simple
ExecStartPre=/bin/sleep 60
ExecStart=/bin/bash -c 'IFS="-" read -r port_in port_out <<< "%i"; exec /root/go/bin/go-mmproxy -l 0.0.0.0:$$port_in -4 127.0.0.1:$$port_out'
Restart=always
RestartSec=1
User=root
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
ip rule add from 127.0.0.1/8 iif lo table 123 || true
ip route add local 0.0.0.0/0 dev lo table 123 || true
# IPv6 (opcional)
ip -6 rule add from ::1/128 iif lo table 123 || true
ip -6 route add local ::/0 dev lo table 123 || true
echo "Ruteo configurado exitosamente en tabla 123."
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=SSH go-mmproxy
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/usr/local/sbin/goproxy.sh
[Install]
WantedBy=multi-user.target