From 52daf51958f5c7f1280b856999b9caab5b6a836d Mon Sep 17 00:00:00 2001
From: Konrad Zemek <konrad.zemek@gmail.com>
Date: Thu, 2 Jan 2020 15:22:59 +0100
Subject: [PATCH] Add an example systemd unit file.

---
 go-mmproxy.service.example | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 go-mmproxy.service.example

diff --git a/go-mmproxy.service.example b/go-mmproxy.service.example
new file mode 100644
index 0000000..b736130
--- /dev/null
+++ b/go-mmproxy.service.example
@@ -0,0 +1,17 @@
+[Unit]
+Description=go-mmproxy
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPost=ip rule add from 127.0.0.1/8 iif lo table 123
+ExecStartPost=ip route add local 0.0.0.0/0 dev lo table 123
+ExecStart=/usr/bin/go-mmproxy -4 127.0.0.1:1000 -6 "[::1]:1000" -allowed-subnets /usr/share/path-prefixes.txt -l 0.0.0.0:1234
+ExecStopPost=ip rule del from 127.0.0.1/8 iif lo table 123
+ExecStopPost=ip route del local 0.0.0.0/0 dev lo table 123
+Restart=on-failure
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target
+
-- 
GitLab