Jelajahi Sumber

将 Telegram IP 段移至 gfwlist.ext 文件

zfl9 8 tahun lalu
induk
melakukan
fe077644c5
2 mengubah file dengan 13 tambahan dan 21 penghapusan
  1. 12 0
      gfwlist.ext
  2. 1 21
      ss-tproxy

+ 12 - 0
gfwlist.ext

@@ -7,6 +7,18 @@
 # 域名:如 example.com (包含 example.com、*.example.com),即"域名后缀"
 # 注意:修改本文件需重启 ss-tproxy 生效,另外请删除每行首尾多余的空白符
 
+# Telegram IP段
+91.108.4.0/22
+91.108.8.0/22
+91.108.12.0/22
+91.108.20.0/22
+91.108.36.0/23
+91.108.38.0/23
+91.108.56.0/22
+149.154.160.0/20
+149.154.164.0/22
+149.154.172.0/22
+
 # 电信直连较慢的网站
 # akstat.io
 # androidfilehost.com

+ 1 - 21
ss-tproxy

@@ -646,16 +646,6 @@ tproxy_gfwlist*)
 
     iptables -t nat -N SS-TCP
     ipset -N gfwlist hash:net &>/dev/null
-    ipset -A gfwlist 91.108.4.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.8.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.12.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.20.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.36.0/23 &>/dev/null
-    ipset -A gfwlist 91.108.38.0/23 &>/dev/null
-    ipset -A gfwlist 91.108.56.0/22 &>/dev/null
-    ipset -A gfwlist 149.154.160.0/20 &>/dev/null
-    ipset -A gfwlist 149.154.164.0/22 &>/dev/null
-    ipset -A gfwlist 149.154.172.0/22 &>/dev/null
     perl -ne 'print if m@^\d++\.\d++\.\d++\.\d++(?:/\d++)?$@' $dnsmasq_gfwlist_ext | xargs -n1 ipset -A gfwlist &>/dev/null
     [[ "$mode" == *tcp ]] && iptables -t nat -A SS-TCP -p tcp -d ${dns_remote%%:*} -j REDIRECT --to-ports 60080
     iptables -t nat -A SS-TCP -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 60080
@@ -743,16 +733,6 @@ tun2socks_gfwlist*)
 
     iptables -t mangle -N TUN2SOCKS
     ipset -N gfwlist hash:net &>/dev/null
-    ipset -A gfwlist 91.108.4.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.8.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.12.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.20.0/22 &>/dev/null
-    ipset -A gfwlist 91.108.36.0/23 &>/dev/null
-    ipset -A gfwlist 91.108.38.0/23 &>/dev/null
-    ipset -A gfwlist 91.108.56.0/22 &>/dev/null
-    ipset -A gfwlist 149.154.160.0/20 &>/dev/null
-    ipset -A gfwlist 149.154.164.0/22 &>/dev/null
-    ipset -A gfwlist 149.154.172.0/22 &>/dev/null
     perl -ne 'print if m@^\d++\.\d++\.\d++\.\d++(?:/\d++)?$@' $dnsmasq_gfwlist_ext | xargs -n1 ipset -A gfwlist &>/dev/null
     [[ "$mode" != *tcp ]] && iptables -t mangle -A TUN2SOCKS -p udp -d ${dns_remote%%:*} -j MARK --set-mark $iptables_pbr_fwmark
     iptables -t mangle -A TUN2SOCKS -m set --match-set gfwlist dst -j MARK --set-mark $iptables_pbr_fwmark
@@ -809,7 +789,7 @@ function start {
     start_rule
     start_kopts
     dns_proxy
-    rm -f $chinadns_chnroute_temp
+    rm -f $chinadns_chnroute_temp &>/dev/null
 }
 
 function stop {