1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-22 19:20:40 +08:00

Completely removed all TUN30 route

This commit is contained in:
Neo_Chen 2020-05-11 17:33:01 +08:00
parent 144cbddf84
commit 41d43ad1e2
35 changed files with 7 additions and 144 deletions

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="TINC"
UPSTREAM="caasih"
DOWNSTREAM="ucbvax"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="septs"
DOWNSTREAM="JerryXiao"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="septs"
DOWNSTREAM="megumiLHS"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="septs"
DOWNSTREAM="LanTian"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="L2TP"
UPSTREAM="septs"
DOWNSTREAM="ucbvax"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="ucbvax"
DOWNSTREAM="santost12"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="ucbvax"
DOWNSTREAM="NeoPDP-11"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="MagicNeko-JP03"
DOWNSTREAM="chenx97"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="septs"
DOWNSTREAM="MagicNeko-RU01"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="MagicNeko-JP03"
DOWNSTREAM="megumiLHS"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="MagicNeko-JP03"
DOWNSTREAM="frank-hsinchu"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="IPsec/GRE"
UPSTREAM="septs"
DOWNSTREAM="James58899"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="pan"
DOWNSTREAM="MagicNeko-JP03"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="caasih"
DOWNSTREAM="NeoPDP-11"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Direct"
UPSTREAM="NeoSystem"
DOWNSTREAM="NeoVAX"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="staph"
DOWNSTREAM="MagicNeko-RU01"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="ucbvax"
DOWNSTREAM="megumiLHS"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="pan"
DOWNSTREAM="NeoPDP-11"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="pan"
DOWNSTREAM="NeoSystem"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="cklvax"
DOWNSTREAM="NeoSystem"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="pan"
DOWNSTREAM="NeoSystem"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="ucbvax"
DOWNSTREAM="MagicNeko-HK01"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="ucbvax"
DOWNSTREAM="pan"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="MagicNeko-HK01"
DOWNSTREAM="Icecat-GroupAccessNetwork"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Tinc"
UPSTREAM="caasih"
DOWNSTREAM="staph"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="ucbvax"
DOWNSTREAM="chenx97"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="ucbvax"
DOWNSTREAM="NeoSystem"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="JerryXiao"
DOWNSTREAM="ucbvax"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="WireGuard"
UPSTREAM="MagicNeko-JP03"
DOWNSTREAM="JerryXiao"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="septs"
DOWNSTREAM="MagicNeko-JP03"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="septs"
DOWNSTREAM="frank-hsinchu"

View file

@ -1,4 +0,0 @@
TYPE="TUN30"
PROTO="Gre"
UPSTREAM="staph"
DOWNSTREAM="septs"

View file

@ -3,7 +3,6 @@ set -e
FILE="dns/db.10.127"
TUN30_TEMP="$(mktemp)"
PP_TEMP="$(mktemp)"
LO_TEMP="$(mktemp)"
if [[ "$(uname)" = *BSD ]]; then
@ -45,15 +44,6 @@ for i in *; do
print_record "$upstream_ip" "$DOWNSTREAM.$UPSTREAM.tun30.neo."
print_record "$downstream_ip" "$UPSTREAM.$DOWNSTREAM.tun30.neo."
) >> "$TUN30_TEMP"
elif [ "$TYPE" = "PTP" ]; then
i="${i/PTP,/}"
upstream_ip="${i%~*}"
downstream_ip="${i#*~}"
(
print_record "$(ipcalc "$upstream_ip" 0)" "$UPSTREAM.ptp.neo."
print_record "$(ipcalc "$downstream_ip" 0)" "$DOWNSTREAM.ptp.neo."
) >> "$PP_TEMP"
elif [ "$TYPE" = "LO" ]; then
ip="${i/,32/}"
@ -65,10 +55,8 @@ done
{
echo -e "\n; Tunnel /30 Addresses"
sort -n < "$TUN30_TEMP"
echo -e "\n; Point to Point Addresses"
sort -n < "$PP_TEMP"
echo -e "\n; Loopback Addresses"
sort -n < "$LO_TEMP"
} >> "$FILE"
rm -f "$TUN30_TEMP" "$PP_TEMP" "$LO_TEMP"
rm -f "$TUN30_TEMP" "$LO_TEMP"

View file

@ -106,13 +106,16 @@ arg="$2" # Optional argument
case "$1" in
asn)
for i in asn/*; do
(
cd asn
for i in *; do
msg "${i#asn/}\n"
source "$i"
printf "${BRIGHT}${FMAGENTA}%-16s${RESET}| ${BRIGHT}${FYELLOW}%s\n\t>> %s\n" \
"$OWNER" "$NAME" "$DESC"
done
)
;;
route)
for i in route*/*; do
@ -122,7 +125,6 @@ route)
case "$TYPE" in
TUN30) print_tun30 "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
SUBNET) print_subnet "$subnet" "$NAME" "$DESC";;
PTP) print_ptp "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
LO) print_lo "$subnet" "$NAME" "$DESC";;
*) errmsg "Invalid \$TYPE in $i\n";;
esac

View file

@ -1,5 +1,6 @@
[Interface]
Address = 10.127.0.xx/30
Address = 10.127.x.x/32, fd80::/32
PostUp = /path/to/wg-postup.sh 10.127.x.x/32 <Peer IPv6> <IPv6 src> fd80::/32 <Peer IPv6>
# Custom DNS
#DNS = 127.0.0.1
# Set MTU to 1412 if using PPP