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