Compare commits
4 Commits
v0.0.92-mu
...
v0.0.93-mu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f65ecac5fe | ||
|
|
086fa412ed | ||
|
|
8476332224 | ||
|
|
9dacd85713 |
@@ -1,6 +1,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include "str.h"
|
||||
#include "iface.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
|
||||
@@ -20,9 +20,9 @@ if [ -n "$HOST" ]; then
|
||||
fi
|
||||
if [ -z "$BIND" ]; then
|
||||
BIND=$(ip route get "$HOST" | awk '/src/{getline;print $0}' RS=' ')
|
||||
ip rule add from "$BIND" table main pref "$((PREF-1))"
|
||||
ip rule add from "$BIND" table main pref "$((PREF-1))" || true
|
||||
fi
|
||||
ip rule add from all table 200 pref "$PREF"
|
||||
ip rule add from all table 200 pref "$PREF" || true
|
||||
fi
|
||||
|
||||
exec glorytun \
|
||||
|
||||
@@ -28,6 +28,7 @@ mkdir -p /etc/glorytun
|
||||
|
||||
cat > /etc/glorytun/"$NAME" <<EOF
|
||||
${HOST:+HOST="$HOST"}
|
||||
MTU_AUTO=yes
|
||||
EOF
|
||||
|
||||
( umask 077; echo "$KEY" > /etc/glorytun/"$NAME".key )
|
||||
|
||||
@@ -6,7 +6,7 @@ After=network.target
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=@bindir@/glorytun-run /etc/glorytun/%i
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user