go-mmproxy
go-mmproxy copied to clipboard
flag provided but not defined
Hello,
I would like to route some ipv6 traffic through go-mmproxy using the ipv6 loopback ip. getting it to work via systemd gives "flag provided but not defined"
systemd-unit file that does not work:
[Unit]
Description=go-mmproxy-sslv6
After=network.target
[Service]
[Service]
Environment="DAEMON_ARGS=-6 "[::1]:4443" -l "[::1]:4444""
#EnvironmentFile=-/etc/default/go-mmproxy
Type=simple
LimitNOFILE=65535
ExecStartPost=/sbin/ip -6 rule add from ::1/128 iif lo table 123
ExecStartPost=/sbin/ip route add local ::/0 dev lo table 123
ExecStart=/usr/bin/go-mmproxy ${DAEMON_ARGS}
ExecStopPost=/sbin/ip rule del from ::1/128 iif lo table 123
ExecStopPost=/sbin/ip route del local ::/0 dev lo table 123
Restart=on-failure
RestartSec=10s
## https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities
AmbientCapabilities=CAP_NET_ADMIN
# CAP_NET_RAW CAP_NET_BIND_SERVICE
User=mmproxy
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectSystem=full
ProtectKernelTunables=true
[Install]
WantedBy=multi-user.target
on the commandline the arguments work fine:
sudo -u mmproxy go-mmproxy -6 [::1]:4443 -l [::1]:4444
{"level":"info","ts":1642754358.9078252,"caller":"go-mproxy/tcp.go:128","msg":"listening","listenerNum":0,"protocol":"tcp","listenAdr":"::1]:4444"}
listening on ipv4 works fine using systemd
full error message in syslog:
flag provided but not defined: -6 [::1]:4443 -l [::1]:4444
Usage of /usr/bin/go-mmproxy:
-4 string
#011Address to which IPv4 traffic will be forwarded to (default "127.0.0.1:443")
-6 string
#011Address to which IPv6 traffic will be forwarded to (default "[::1]:443")
-allowed-subnets string
#011Path to a file that contains allowed subnets of the proxy servers
-close-after int
#011Number of seconds after which UDP socket will be cleaned up (default 60)
-l string
#011Address the proxy listens on (default "0.0.0.0:8443")
-listeners int
#011Number of listener sockets that will be opened for the listen address (Linux 3.9+) (default 1)
-mark int
#011The mark that will be set on outbound packets
-p string
#011Protocol that will be proxied: tcp, udp (default "tcp")
-v int
#0110 - no logging of individual connections
#0111 - log errors occurring in individual connections
#0112 - log all state changes of individual connections