diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index f3ab73d..8cabcd3 100755 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -61,8 +61,8 @@ MLVPN_BINARY_VERSION="3.0.0+20211028.git.ddafba3" UBOND_VERSION="31af0f69ebb6d07ed9348dca2fced33b956cedee" OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" OBFS_BINARY_VERSION="0.0.5-1" -OMR_ADMIN_VERSION="80ff9621748ec198b3a81660539a144ef443a531" -OMR_ADMIN_BINARY_VERSION="0.3+20230901" +OMR_ADMIN_VERSION="488cc5346dbfe8bcbee4413013dc22b698f1d15c" +OMR_ADMIN_BINARY_VERSION="0.3+20230911" #OMR_ADMIN_BINARY_VERSION="0.3+20220827" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" DSVPN_BINARY_VERSION="0.1.4-2" @@ -816,6 +816,7 @@ else cp ${DIR}/omr-update /usr/bin/omr-update chmod 755 /usr/bin/omr-update fi +chmod 644 /lib/systemd/system/omr-update.service # Install simple-obfs if [ "$OBFS" = "yes" ]; then @@ -940,9 +941,15 @@ if [ "$V2RAY" = "yes" ]; then fi rm -f /etc/v2ray/config.json ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json - if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then - mv -f /etc/systemd/system/v2ray.service.dpkg-dist /etc/systemd/system/v2ray.service + #if [ -f /etc/systemd/system/v2ray.service.dpkg-dist ]; then + # mv -f /etc/systemd/system/v2ray.service.dpkg-dist /etc/systemd/system/v2ray.service + #fi + if [ "$LOCALFILES" = "no" ]; then + wget -O /lib/systemd/system/v2ray.service ${VPSURL}${VPSPATH}/v2ray.service + else + cp ${DIR}/v2ray.service /lib/systemd/system/v2ray.service fi + chmod 644 /lib/systemd/system/v2ray.service systemctl daemon-reload systemctl enable v2ray.service #if [ "$UPSTREAM" = "yes" ] || [ "$UPSTREAM6" = "yes" ]; then @@ -1671,13 +1678,13 @@ if [ "$update" = "0" ]; then fi if [ "$MLVPN" = "yes" ]; then cat >> /root/openmptcprouter_config.txt <<-EOF - MLVPN first port: 65201' + MLVPN first port: 65201 Your MLVPN password: $MLVPN_PASS EOF fi if [ "$UBOND" = "yes" ]; then cat >> /root/openmptcprouter_config.txt <<-EOF - UBOND first port: 65251' + UBOND first port: 65251 Your UBOND password: $UBOND_PASS EOF fi diff --git a/omr-service b/omr-service index ec2adc2..6846980 100755 --- a/omr-service +++ b/omr-service @@ -114,7 +114,7 @@ _gre_tunnels() { . "$(readlink -f "$intf")" iface="$(basename $intf)" if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then - ip tunnel del $iface 2>&1 >/dev/null + [ -n "$(ip tunnel show $iface 2>/dev/null)" ] && ip tunnel del $iface 2>&1 >/dev/null ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR 2>&1 >/dev/null ip link set $iface up 2>&1 >/dev/null ip addr add $LOCALIP dev $iface 2>&1 >/dev/null diff --git a/omr.service.in b/omr.service.in index 4e17716..0e9352b 100644 --- a/omr.service.in +++ b/omr.service.in @@ -1,6 +1,6 @@ [Unit] Description=OMR -After=network.target network-online.target glorytun-tcp@.service glorytun-udp@.service +After=network.target network-online.target glorytun-tcp@.service glorytun-udp@.service shorewall.service [Service] Type=simple diff --git a/v2ray-server.json b/v2ray-server.json index d605b3d..95f8dbf 100644 --- a/v2ray-server.json +++ b/v2ray-server.json @@ -92,8 +92,7 @@ "pass": "V2RAY_UUID", "user": "openmptcprouter" } - ], - "udp": true + ] }, "streamSettings": { "sockopt": { diff --git a/v2ray.service b/v2ray.service new file mode 100644 index 0000000..9ac9baa --- /dev/null +++ b/v2ray.service @@ -0,0 +1,18 @@ +[Unit] +Description=V2Ray Service +Documentation=https://www.v2fly.org/ +After=network.target nss-lookup.target +Wants=network-online.target + +[Service] +User=root +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW +NoNewPrivileges=true +ExecStart=/usr/bin/v2ray run -config /etc/v2ray/config.json +Restart=always +RestartPreventExitStatus=23 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target