1/2 mm-proxy
This commit is contained in:
@@ -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
|
||||
@@ -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."
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user