1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-02-12 11:21:56 +00:00

Update omr-admin, fix Pi-Hole install, optimize OpenVPN

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-12-08 07:59:01 +00:00
parent c0af37c0c2
commit c708189fb9
4 changed files with 21 additions and 16 deletions

View file

@ -66,8 +66,8 @@ MLVPN_BINARY_VERSION="3.0.0+20211028.git.ddafba3"
UBOND_VERSION="31af0f69ebb6d07ed9348dca2fced33b956cedee" UBOND_VERSION="31af0f69ebb6d07ed9348dca2fced33b956cedee"
OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4" OBFS_VERSION="486bebd9208539058e57e23a12f23103016e09b4"
OBFS_BINARY_VERSION="0.0.5-1" OBFS_BINARY_VERSION="0.0.5-1"
OMR_ADMIN_VERSION="afbcb55ef352a77c5f50a1b7e402ec515f5944b0" OMR_ADMIN_VERSION="a671b9171edeb82fc8ff8bb150ca6ffd6f57ee6a"
OMR_ADMIN_BINARY_VERSION="0.5+20231021" OMR_ADMIN_BINARY_VERSION="0.7+20231206"
#OMR_ADMIN_BINARY_VERSION="0.3+20220827" #OMR_ADMIN_BINARY_VERSION="0.3+20220827"
DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a" DSVPN_VERSION="3b99d2ef6c02b2ef68b5784bec8adfdd55b29b1a"
DSVPN_BINARY_VERSION="0.1.4-2" DSVPN_BINARY_VERSION="0.1.4-2"
@ -302,25 +302,25 @@ else
Pin: origin ${REPO} Pin: origin ${REPO}
Pin-Priority: 1001 Pin-Priority: 1001
EOF EOF
if [ -n "$(echo $OMR_VERSION | grep test)" ]; then
echo "deb [arch=amd64] https://${REPO} next main" > /etc/apt/sources.list.d/openmptcprouter-test.list
# cat <<-EOF | tee -a /etc/apt/preferences.d/openmptcprouter.pref
# Explanation: Prefer OpenMPTCProuter provided packages over the Debian native ones
# Package: *
# Pin: origin ${REPO}
# Pin-Priority: 1002
# EOF
else
rm -f /etc/apt/sources.list.d/openmptcprouter-test.list
fi
if [ "$ID" = "debian" ] && ([ "$VERSION_ID" = "11" ] || [ "$VERSION_ID" = "12" ]); then if [ "$ID" = "debian" ] && ([ "$VERSION_ID" = "11" ] || [ "$VERSION_ID" = "12" ]); then
cat <<-EOF | tee /etc/apt/preferences.d/openmptcprouter.pref cat <<-EOF | tee -a /etc/apt/preferences.d/openmptcprouter.pref
Explanation: Prefer libuv1 Debian native package Explanation: Prefer libuv1 Debian native package
Package: libuv1 Package: libuv1
Pin: version * Pin: version *
Pin-Priority: 1003 Pin-Priority: 1003
EOF EOF
fi fi
if [ -n "$(echo $OMR_VERSION | grep test)" ]; then
echo "deb [arch=amd64] https://${REPO} next main" > /etc/apt/sources.list.d/openmptcprouter-test.list
cat <<-EOF | tee /etc/apt/preferences.d/openmptcprouter.pref
Explanation: Prefer OpenMPTCProuter provided packages over the Debian native ones
Package: *
Pin: origin ${REPO}
Pin-Priority: 1002
EOF
else
rm -f /etc/apt/sources.list.d/openmptcprouter-test.list
fi
wget -O - https://${REPO}/openmptcprouter.gpg.key | apt-key add - wget -O - https://${REPO}/openmptcprouter.gpg.key | apt-key add -
fi fi

View file

@ -117,7 +117,9 @@ if [ -f /proc/sys/net/mptcp/mptcp_enabled ]; then
else else
ID=$(ip mptcp endpoint show | grep -m 1 "dev $DEVICE" | awk '{print $3}') ID=$(ip mptcp endpoint show | grep -m 1 "dev $DEVICE" | awk '{print $3}')
IFF=$(ip mptcp endpoint show | grep -m 1 "dev $DEVICE" | awk '{print $4}') IFF=$(ip mptcp endpoint show | grep -m 1 "dev $DEVICE" | awk '{print $4}')
IP=$(ip a show $DEVICE | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p') #IP=$(ip a show $DEVICE | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
[ -f /usr/bin/jsonfilter ] && IP=$(ip -j a show $DEVICE | jsonfilter -e '@[0].addr_info[*].local')
[ -f /usr/bin/jq ] && IP=$(ip -j a show $DEVICE | jq -r '.[0].addr_info[].local')
RMID=$(ip mptcp endpoint show | grep '::ffff' | awk '{ print $3 }') RMID=$(ip mptcp endpoint show | grep '::ffff' | awk '{ print $3 }')
[ -n "$RMID" ] && ip mptcp endpoint delete id $RMID 2>&1 >/dev/null [ -n "$RMID" ] && ip mptcp endpoint delete id $RMID 2>&1 >/dev/null
case $TYPE in case $TYPE in

View file

@ -31,7 +31,7 @@ $SERVER["socket"] == "10.255.252.1:80" { }
$SERVER["socket"] == "10.255.251.1:80" { } $SERVER["socket"] == "10.255.251.1:80" { }
$SERVER["socket"] == "10.255.253.1:80" { } $SERVER["socket"] == "10.255.253.1:80" { }
EOF EOF
systemctl -q restart lighttpd systemctl list-unit-files lighttpd.service &>/dev/null && systemctl -q restart lighttpd
grep -v -e PIHOLE_INTERFACE -e IPV4_ADDRESS -e IPV6_ADDRESS /etc/pihole/setupVars.conf > /etc/pihole/setupVars.new.conf grep -v -e PIHOLE_INTERFACE -e IPV4_ADDRESS -e IPV6_ADDRESS /etc/pihole/setupVars.conf > /etc/pihole/setupVars.new.conf
mv /etc/pihole/setupVars.new.conf /etc/pihole/setupVars.conf mv /etc/pihole/setupVars.new.conf /etc/pihole/setupVars.conf
cat >> /etc/pihole/setupVars.conf <<-EOF cat >> /etc/pihole/setupVars.conf <<-EOF

View file

@ -18,6 +18,9 @@ crl-verify /etc/openvpn/ca/pki/crl.pem
keepalive 10 240 keepalive 10 240
sndbuf 0 sndbuf 0
rcvbuf 0 rcvbuf 0
txqueuelen 2000
tun-mtu 1400
mssfix 1360
tls-server tls-server
tls-version-min 1.2 tls-version-min 1.2
#compress lzo #compress lzo