diff --git a/route/10.127.0.0,30 b/route/10.127.0.0,30 deleted file mode 100644 index 898b9bf..0000000 --- a/route/10.127.0.0,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="TINC" -UPSTREAM="caasih" -DOWNSTREAM="ucbvax" diff --git a/route/10.127.0.100,30 b/route/10.127.0.100,30 deleted file mode 100644 index 6f17065..0000000 --- a/route/10.127.0.100,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="septs" -DOWNSTREAM="JerryXiao" diff --git a/route/10.127.0.104,30 b/route/10.127.0.104,30 deleted file mode 100644 index d033d99..0000000 --- a/route/10.127.0.104,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="septs" -DOWNSTREAM="megumiLHS" diff --git a/route/10.127.0.108,30 b/route/10.127.0.108,30 deleted file mode 100644 index 76c3427..0000000 --- a/route/10.127.0.108,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="septs" -DOWNSTREAM="LanTian" diff --git a/route/10.127.0.112,30 b/route/10.127.0.112,30 deleted file mode 100644 index ac2e1b9..0000000 --- a/route/10.127.0.112,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="L2TP" -UPSTREAM="septs" -DOWNSTREAM="ucbvax" diff --git a/route/10.127.0.116,30 b/route/10.127.0.116,30 deleted file mode 100644 index 6d6aad8..0000000 --- a/route/10.127.0.116,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="ucbvax" -DOWNSTREAM="santost12" diff --git a/route/10.127.0.12,30 b/route/10.127.0.12,30 deleted file mode 100644 index e5cc042..0000000 --- a/route/10.127.0.12,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="ucbvax" -DOWNSTREAM="NeoPDP-11" diff --git a/route/10.127.0.120,30 b/route/10.127.0.120,30 deleted file mode 100644 index 9fb63ca..0000000 --- a/route/10.127.0.120,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="MagicNeko-JP03" -DOWNSTREAM="chenx97" diff --git a/route/10.127.0.124,30 b/route/10.127.0.124,30 deleted file mode 100644 index 07d2b8d..0000000 --- a/route/10.127.0.124,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="septs" -DOWNSTREAM="MagicNeko-RU01" diff --git a/route/10.127.0.128,30 b/route/10.127.0.128,30 deleted file mode 100644 index 7171795..0000000 --- a/route/10.127.0.128,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="MagicNeko-JP03" -DOWNSTREAM="megumiLHS" diff --git a/route/10.127.0.132,30 b/route/10.127.0.132,30 deleted file mode 100644 index 5bf519a..0000000 --- a/route/10.127.0.132,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="MagicNeko-JP03" -DOWNSTREAM="frank-hsinchu" diff --git a/route/10.127.0.136,30 b/route/10.127.0.136,30 deleted file mode 100644 index 7d44504..0000000 --- a/route/10.127.0.136,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="IPsec/GRE" -UPSTREAM="septs" -DOWNSTREAM="James58899" diff --git a/route/10.127.0.140,30 b/route/10.127.0.140,30 deleted file mode 100644 index 7c9b12d..0000000 --- a/route/10.127.0.140,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="pan" -DOWNSTREAM="MagicNeko-JP03" diff --git a/route/10.127.0.16,30 b/route/10.127.0.16,30 deleted file mode 100644 index 4321597..0000000 --- a/route/10.127.0.16,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="caasih" -DOWNSTREAM="NeoPDP-11" diff --git a/route/10.127.0.20,30 b/route/10.127.0.20,30 deleted file mode 100644 index b09fe3e..0000000 --- a/route/10.127.0.20,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Direct" -UPSTREAM="NeoSystem" -DOWNSTREAM="NeoVAX" diff --git a/route/10.127.0.24,30 b/route/10.127.0.24,30 deleted file mode 100644 index fb36ccf..0000000 --- a/route/10.127.0.24,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="staph" -DOWNSTREAM="MagicNeko-RU01" diff --git a/route/10.127.0.28,30 b/route/10.127.0.28,30 deleted file mode 100644 index 7faca84..0000000 --- a/route/10.127.0.28,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="ucbvax" -DOWNSTREAM="megumiLHS" diff --git a/route/10.127.0.40,30 b/route/10.127.0.40,30 deleted file mode 100644 index cf0ce9e..0000000 --- a/route/10.127.0.40,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="pan" -DOWNSTREAM="NeoPDP-11" diff --git a/route/10.127.0.44,30 b/route/10.127.0.44,30 deleted file mode 100644 index 885d7fb..0000000 --- a/route/10.127.0.44,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="pan" -DOWNSTREAM="NeoSystem" diff --git a/route/10.127.0.48,30 b/route/10.127.0.48,30 deleted file mode 100644 index 6d0db2c..0000000 --- a/route/10.127.0.48,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="cklvax" -DOWNSTREAM="NeoSystem" diff --git a/route/10.127.0.52,30 b/route/10.127.0.52,30 deleted file mode 100644 index f05343f..0000000 --- a/route/10.127.0.52,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="pan" -DOWNSTREAM="NeoSystem" diff --git a/route/10.127.0.56,30 b/route/10.127.0.56,30 deleted file mode 100644 index 1a4e42e..0000000 --- a/route/10.127.0.56,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="ucbvax" -DOWNSTREAM="MagicNeko-HK01" diff --git a/route/10.127.0.60,30 b/route/10.127.0.60,30 deleted file mode 100644 index 4665b06..0000000 --- a/route/10.127.0.60,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="ucbvax" -DOWNSTREAM="pan" diff --git a/route/10.127.0.64,30 b/route/10.127.0.64,30 deleted file mode 100644 index 3034b10..0000000 --- a/route/10.127.0.64,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="MagicNeko-HK01" -DOWNSTREAM="Icecat-GroupAccessNetwork" diff --git a/route/10.127.0.68,30 b/route/10.127.0.68,30 deleted file mode 100644 index 8ae4c20..0000000 --- a/route/10.127.0.68,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Tinc" -UPSTREAM="caasih" -DOWNSTREAM="staph" diff --git a/route/10.127.0.72,30 b/route/10.127.0.72,30 deleted file mode 100644 index 2558769..0000000 --- a/route/10.127.0.72,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="ucbvax" -DOWNSTREAM="chenx97" diff --git a/route/10.127.0.8,30 b/route/10.127.0.8,30 deleted file mode 100644 index 6e142be..0000000 --- a/route/10.127.0.8,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="ucbvax" -DOWNSTREAM="NeoSystem" diff --git a/route/10.127.0.80,30 b/route/10.127.0.80,30 deleted file mode 100644 index c3652f7..0000000 --- a/route/10.127.0.80,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="JerryXiao" -DOWNSTREAM="ucbvax" diff --git a/route/10.127.0.84,30 b/route/10.127.0.84,30 deleted file mode 100644 index ede4667..0000000 --- a/route/10.127.0.84,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="WireGuard" -UPSTREAM="MagicNeko-JP03" -DOWNSTREAM="JerryXiao" diff --git a/route/10.127.0.88,30 b/route/10.127.0.88,30 deleted file mode 100644 index cc9e263..0000000 --- a/route/10.127.0.88,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="septs" -DOWNSTREAM="MagicNeko-JP03" diff --git a/route/10.127.0.92,30 b/route/10.127.0.92,30 deleted file mode 100644 index 2cb1ee2..0000000 --- a/route/10.127.0.92,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="septs" -DOWNSTREAM="frank-hsinchu" diff --git a/route/10.127.0.96,30 b/route/10.127.0.96,30 deleted file mode 100644 index 2e6dde8..0000000 --- a/route/10.127.0.96,30 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="TUN30" -PROTO="Gre" -UPSTREAM="staph" -DOWNSTREAM="septs" diff --git a/scripts/dns-reverse-generator.sh b/scripts/dns-reverse-generator.sh index 987cddf..3214cd0 100755 --- a/scripts/dns-reverse-generator.sh +++ b/scripts/dns-reverse-generator.sh @@ -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" diff --git a/scripts/pretty-output.sh b/scripts/pretty-output.sh index 33ae592..0469dda 100755 --- a/scripts/pretty-output.sh +++ b/scripts/pretty-output.sh @@ -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 diff --git a/vpn/wireguard.conf b/vpn/wireguard.conf index 11369f1..6ed90bd 100644 --- a/vpn/wireguard.conf +++ b/vpn/wireguard.conf @@ -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 fd80::/32 # Custom DNS #DNS = 127.0.0.1 # Set MTU to 1412 if using PPP