├── .gitignore ├── Gemfile ├── Gemfile.lock ├── README.md ├── butter ├── config.json ├── data ├── dnscrypt-proxy │ └── dnscrypt-proxy ├── dnsmasq │ ├── dnsmasq.conf │ └── dnsmasq.d │ │ ├── addresses.conf │ │ └── forwarded.conf ├── ip-ranges.json ├── ip-ranges │ ├── akamai.json │ ├── aws.json │ ├── cloudflare.json │ ├── domains.json │ ├── dropbox.json │ ├── edgecast.json │ ├── facebook.json │ ├── fastly.json │ ├── github.json │ ├── google.json │ ├── mindspark.json │ ├── twitter.json │ └── wikimedia.json └── router_os │ └── rules.txt └── lib ├── addr_merger.rb ├── choices.rb └── handler.rb /.gitignore: -------------------------------------------------------------------------------- 1 | login.json 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'choice', '~> 0.2.0' 4 | gem 'net-ssh', '~> 2.9.2' 5 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://ruby.taobao.org/ 3 | specs: 4 | choice (0.2.0) 5 | net-ssh (2.9.2) 6 | 7 | PLATFORMS 8 | ruby 9 | 10 | DEPENDENCIES 11 | choice (~> 0.2.0) 12 | net-ssh (~> 2.9.2) 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NET BUTTER 2 | ========== 3 | 4 | 这是什么 5 | -------- 6 | 7 | 这是我们正在使用的一个反网络封锁方案。 8 | 9 | 原理 10 | ---- 11 | 12 | 通过路由器,将需要的流量转发到本地的 Squid 透明代理,然后转发到可以访问相应网络的代理服务器。 13 | 14 | 15 | TODO 16 | ---- 17 | 18 | - [ ] 重写代理规则生成器 19 | - [ ] 适应海内外双向使用 20 | 21 | 22 | 问题反馈 23 | -------- 24 | 25 | [报告问题](https://github.com/pragbyte/gfw-butter/issues) 26 | 27 | 欢迎 Fork && Pull Request。 28 | -------------------------------------------------------------------------------- /butter: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | PROGRAM_VERSION = 2.3 4 | ROOT_PATH = __dir__ 5 | 6 | require_relative 'lib/choices' 7 | require_relative 'lib/handler' 8 | 9 | choices = Choice.choices 10 | Choice.help && abort if choices.empty? 11 | 12 | handler = Butter::Handler.new 13 | choices.keys.each do |choice| 14 | handler.send choice 15 | end 16 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "networks": { 3 | "google": ["AS45566", "AS41264", "AS36987", "AS36492", "AS36385", "AS36384", "AS36040", "AS36039", "AS22859", "AS22577", "AS15169"], 4 | "twitter": ["AS54888", "AS35995", "AS13414"], 5 | "facebook": ["AS63293", "AS54115", "AS32934"], 6 | "fastly": "AS54113", 7 | "akamai": ["AS55770", "AS49846", "AS48163", "AS43639", "AS39836", "AS393560", "AS36183", "AS35994", "AS35993", "AS35204", "AS34850", "AS34164", "AS33905", "AS31377", "AS31110", "AS31109", "AS31108", "AS31107", "AS30675", "AS24319", "AS23903", "AS23455", "AS23454", "AS22207", "AS21399", "AS21357", "AS21342", "AS20940", "AS20189", "AS18717", "AS18680", "AS17334", "AS16702", "AS16625", "AS12222"], 8 | "edgecast": ["AS15133", "AS14210", "AS14153"], 9 | "dropbox": "AS19679", 10 | "mindspark": "AS14829", 11 | "wikimedia": "AS14907", 12 | "github": "AS36459" 13 | }, 14 | 15 | "domains": [ 16 | "www.gravatar.com", 17 | "dnscrypt.org", 18 | "packagist.org", 19 | "www.instapaper.com", 20 | "rubygems.org", 21 | "laravel.com", 22 | "disqus.com", 23 | "ocsp.digicert.com", 24 | "crl3.digicert.com", 25 | "crl4.digicert.com", 26 | "rubydoc.info", 27 | "onedrive.live.com", 28 | "chat-main.hipchat.com", 29 | "instagram.com" 30 | ], 31 | 32 | "resolving": [ 33 | "akamai.net", 34 | "akamaihd.net", 35 | "amazonaws.com", 36 | "android.com", 37 | "appspot.com", 38 | "blogger.com", 39 | "blogspot.com", 40 | "chrome.com", 41 | "chromium.org", 42 | "cloudfront.net", 43 | "dropbox.com", 44 | "dropboxusercontent.com", 45 | "edgecastcdn.net", 46 | "edgesuite.net", 47 | "facebook.com", 48 | "fastly.net", 49 | "fbcdn.net", 50 | "feedburner.com", 51 | "g.co", 52 | "ggpht.com", 53 | "github.com", 54 | "gmail.com", 55 | "golang.org", 56 | "goo.gl", 57 | "google-analytics.com", 58 | "google.co.jp", 59 | "google.com", 60 | "google.com.hk", 61 | "googleadservices.com", 62 | "googleapis.com", 63 | "googlecode.com", 64 | "googledrive.com", 65 | "googlehosted.com", 66 | "googlelabs.com", 67 | "googlemail.com", 68 | "googlesource.com", 69 | "googlesyndication.com", 70 | "googleusercontent.com", 71 | "googlevideo.com", 72 | "googlezip.net", 73 | "gravatar.com", 74 | "gstatic.com", 75 | "instagram.com", 76 | "t.co", 77 | "twimg.com", 78 | "twitter.com", 79 | "wikipedia.org", 80 | "youtube.com", 81 | "ytimg.com" 82 | ] 83 | } 84 | -------------------------------------------------------------------------------- /data/dnscrypt-proxy/dnscrypt-proxy: -------------------------------------------------------------------------------- 1 | # Defaults for dnscrypt-proxy upstart script 2 | # See man 8 dnscrypt-proxy for more info on each parameter 3 | # /usr/share/man/man8/dnscrypt-proxy.8.gz 4 | # from a Terminal $ man dnscrypt-proxy 5 | 6 | # To run dnscrypt-proxy from a dedicated user with restricted privilege 7 | # command line used to create the restricted privilege user [information] 8 | #$ sudo adduser --system --quiet --home /run/dnscrypt --shell /bin/false --group --disabled-password --disabled-login dnscrypt 9 | # This a security feature and should never be disabled 10 | user=dnscrypt 11 | 12 | # What local IP the daemon will listen to, with an optional port. The default port is 53. 13 | local-address=127.0.0.1:5353 14 | 15 | # instructs resolvconf (if installed) to update the machine dns servers 16 | resolvconf=no 17 | 18 | # Write PID to a file. 19 | pidfile=/run/dnscrypt-proxy.pid 20 | 21 | # Remote DNS(Crypt) provider settings 22 | # The current list of resolvers @ https://github.com/jedisct1/dnscrypt-proxy/blob/master/dnscrypt-resolvers.csv 23 | # The installed list of available resolvers @ /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv 24 | # Technical usage information @ /usr/share/doc/dnscrypt-proxy/README.markdown.gz 25 | # Specifying multiple resolvers is not yet supported! 26 | resolver-address=208.67.220.220:443 27 | provider-name=2.dnscrypt-cert.opendns.com 28 | provider-key=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79 29 | # DNSCrypt.eu Resolver #1 @ The Hague, Holland 30 | #resolver-address=208.67.222.222:443 31 | #provider-name=2.dnscrypt-cert.resolver1.dnscrypt.eu 32 | #provider-key=67C0:0F2C:21C5:5481:45DD:7CB4:6A27:1AF2:EB96:9931:40A3:09B6:2B8D:1653:1185:9C66 33 | # DNSCrypt.eu Resolver #2 @ Copenhagen, Denmark 34 | #resolver-address=77.66.84.233:443 35 | #provider-name=2.dnscrypt-cert.resolver2.dnscrypt.eu 36 | #provider-key=3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955 37 | 38 | # Transparently add an OPT pseudo-RR to outgoing queries in order to enable the EDNS0 extension mechanism. 39 | # This feature is enabled by default, with a payload size of 1252 bytes. Any value below 512 disables it. 40 | #edns-payload-size=1252 41 | 42 | # The maximum number of simultaneous active requests. The default value is 250. 43 | #max-active-requests=250 44 | 45 | # Use TCP instead of UDP. This is slower than UDP, and this workaround should never be used 46 | # except when bypassing a filter is actually required. 47 | # Moreover, multiple queries over a single TCP connections aren't supported yet. 48 | #tcp-only 49 | -------------------------------------------------------------------------------- /data/dnsmasq/dnsmasq.conf: -------------------------------------------------------------------------------- 1 | # Configuration file for dnsmasq. 2 | # 3 | # Format is one option per line, legal options are the same 4 | # as the long options legal on the command line. See 5 | # "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. 6 | 7 | # Listen on this specific port instead of the standard DNS port 8 | # (53). Setting this to zero completely disables DNS function, 9 | # leaving only DHCP and/or TFTP. 10 | #port=5353 11 | 12 | # The following two options make you a better netizen, since they 13 | # tell dnsmasq to filter out queries which the public DNS cannot 14 | # answer, and which load the servers (especially the root servers) 15 | # unnecessarily. If you have a dial-on-demand link they also stop 16 | # these requests from bringing up the link unnecessarily. 17 | 18 | # Never forward plain names (without a dot or domain part) 19 | #domain-needed 20 | # Never forward addresses in the non-routed address spaces. 21 | #bogus-priv 22 | 23 | 24 | # Uncomment this to filter useless windows-originated DNS requests 25 | # which can trigger dial-on-demand links needlessly. 26 | # Note that (amongst other things) this blocks all SRV requests, 27 | # so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. 28 | # This option only affects forwarding, SRV records originating for 29 | # dnsmasq (via srv-host= lines) are not suppressed by it. 30 | #filterwin2k 31 | 32 | # Change this line if you want dns to get its upstream servers from 33 | # somewhere other that /etc/resolv.conf 34 | #resolv-file= 35 | 36 | # By default, dnsmasq will send queries to any of the upstream 37 | # servers it knows about and tries to favour servers to are known 38 | # to be up. Uncommenting this forces dnsmasq to try each query 39 | # with each server strictly in the order they appear in 40 | # /etc/resolv.conf 41 | #strict-order 42 | 43 | # If you don't want dnsmasq to read /etc/resolv.conf or any other 44 | # file, getting its servers from this file instead (see below), then 45 | # uncomment this. 46 | #no-resolv 47 | 48 | # If you don't want dnsmasq to poll /etc/resolv.conf or other resolv 49 | # files for changes and re-read them then uncomment this. 50 | #no-poll 51 | 52 | # Add other name servers here, with domain specs if they are for 53 | # non-public domains. 54 | #server=/localnet/192.168.0.1 55 | 56 | # Example of routing PTR queries to nameservers: this will send all 57 | # address->name queries for 192.168.3/24 to nameserver 10.1.2.3 58 | #server=/3.168.192.in-addr.arpa/10.1.2.3 59 | 60 | # Add local-only domains here, queries in these domains are answered 61 | # from /etc/hosts or DHCP only. 62 | #local=/localnet/ 63 | 64 | # Add domains which you want to force to an IP address here. 65 | # The example below send any host in double-click.net to a local 66 | # web-server. 67 | #address=/double-click.net/127.0.0.1 68 | 69 | # --address (and --server) work with IPv6 addresses too. 70 | #address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 71 | 72 | # You can control how dnsmasq talks to a server: this forces 73 | # queries to 10.1.2.3 to be routed via eth1 74 | # server=10.1.2.3@eth1 75 | 76 | # and this sets the source (ie local) address used to talk to 77 | # 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that 78 | # IP on the machine, obviously). 79 | # server=10.1.2.3@192.168.1.1#55 80 | 81 | # If you want dnsmasq to change uid and gid to something other 82 | # than the default, edit the following lines. 83 | #user= 84 | #group= 85 | 86 | # If you want dnsmasq to listen for DHCP and DNS requests only on 87 | # specified interfaces (and the loopback) give the name of the 88 | # interface (eg eth0) here. 89 | # Repeat the line for more than one interface. 90 | #interface= 91 | # Or you can specify which interface _not_ to listen on 92 | #except-interface= 93 | # Or which to listen on by address (remember to include 127.0.0.1 if 94 | # you use this.) 95 | #listen-address= 96 | # If you want dnsmasq to provide only DNS service on an interface, 97 | # configure it as shown above, and then use the following line to 98 | # disable DHCP and TFTP on it. 99 | #no-dhcp-interface= 100 | 101 | # On systems which support it, dnsmasq binds the wildcard address, 102 | # even when it is listening on only some interfaces. It then discards 103 | # requests that it shouldn't reply to. This has the advantage of 104 | # working even when interfaces come and go and change address. If you 105 | # want dnsmasq to really bind only the interfaces it is listening on, 106 | # uncomment this option. About the only time you may need this is when 107 | # running another nameserver on the same machine. 108 | #bind-interfaces 109 | 110 | # If you don't want dnsmasq to read /etc/hosts, uncomment the 111 | # following line. 112 | #no-hosts 113 | # or if you want it to read another file, as well as /etc/hosts, use 114 | # this. 115 | #addn-hosts=/etc/banner_add_hosts 116 | 117 | # Set this (and domain: see below) if you want to have a domain 118 | # automatically added to simple names in a hosts-file. 119 | #expand-hosts 120 | 121 | # Set the domain for dnsmasq. this is optional, but if it is set, it 122 | # does the following things. 123 | # 1) Allows DHCP hosts to have fully qualified domain names, as long 124 | # as the domain part matches this setting. 125 | # 2) Sets the "domain" DHCP option thereby potentially setting the 126 | # domain of all systems configured by DHCP 127 | # 3) Provides the domain part for "expand-hosts" 128 | #domain=thekelleys.org.uk 129 | 130 | # Set a different domain for a particular subnet 131 | #domain=wireless.thekelleys.org.uk,192.168.2.0/24 132 | 133 | # Same idea, but range rather then subnet 134 | #domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 135 | 136 | # Uncomment this to enable the integrated DHCP server, you need 137 | # to supply the range of addresses available for lease and optionally 138 | # a lease time. If you have more than one network, you will need to 139 | # repeat this for each network on which you want to supply DHCP 140 | # service. 141 | #dhcp-range=192.168.0.50,192.168.0.150,12h 142 | 143 | # This is an example of a DHCP range where the netmask is given. This 144 | # is needed for networks we reach the dnsmasq DHCP server via a relay 145 | # agent. If you don't know what a DHCP relay agent is, you probably 146 | # don't need to worry about this. 147 | #dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h 148 | 149 | # This is an example of a DHCP range which sets a tag, so that 150 | # some DHCP options may be set only for this network. 151 | #dhcp-range=set:red,192.168.0.50,192.168.0.150 152 | 153 | # Use this DHCP range only when the tag "green" is set. 154 | #dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h 155 | 156 | # Specify a subnet which can't be used for dynamic address allocation, 157 | # is available for hosts with matching --dhcp-host lines. Note that 158 | # dhcp-host declarations will be ignored unless there is a dhcp-range 159 | # of some type for the subnet in question. 160 | # In this case the netmask is implied (it comes from the network 161 | # configuration on the machine running dnsmasq) it is possible to give 162 | # an explicit netmask instead. 163 | #dhcp-range=192.168.0.0,static 164 | 165 | # Enable DHCPv6. Note that the prefix-length does not need to be specified 166 | # and defaults to 64 if missing/ 167 | #dhcp-range=1234::2, 1234::500, 64, 12h 168 | 169 | # Do Router Advertisements, BUT NOT DHCP for this subnet. 170 | #dhcp-range=1234::, ra-only 171 | 172 | # Do Router Advertisements, BUT NOT DHCP for this subnet, also try and 173 | # add names to the DNS for the IPv6 address of SLAAC-configured dual-stack 174 | # hosts. Use the DHCPv4 lease to derive the name, network segment and 175 | # MAC address and assume that the host will also have an 176 | # IPv6 address calculated using the SLAAC alogrithm. 177 | #dhcp-range=1234::, ra-names 178 | 179 | # Do Router Advertisements, BUT NOT DHCP for this subnet. 180 | # Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) 181 | #dhcp-range=1234::, ra-only, 48h 182 | 183 | # Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA 184 | # so that clients can use SLAAC addresses as well as DHCP ones. 185 | #dhcp-range=1234::2, 1234::500, slaac 186 | 187 | # Do Router Advertisements and stateless DHCP for this subnet. Clients will 188 | # not get addresses from DHCP, but they will get other configuration information. 189 | # They will use SLAAC for addresses. 190 | #dhcp-range=1234::, ra-stateless 191 | 192 | # Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses 193 | # from DHCPv4 leases. 194 | #dhcp-range=1234::, ra-stateless, ra-names 195 | 196 | # Do router advertisements for all subnets where we're doing DHCPv6 197 | # Unless overriden by ra-stateless, ra-names, et al, the router 198 | # advertisements will have the M and O bits set, so that the clients 199 | # get addresses and configuration from DHCPv6, and the A bit reset, so the 200 | # clients don't use SLAAC addresses. 201 | #enable-ra 202 | 203 | # Supply parameters for specified hosts using DHCP. There are lots 204 | # of valid alternatives, so we will give examples of each. Note that 205 | # IP addresses DO NOT have to be in the range given above, they just 206 | # need to be on the same network. The order of the parameters in these 207 | # do not matter, it's permissible to give name, address and MAC in any 208 | # order. 209 | 210 | # Always allocate the host with Ethernet address 11:22:33:44:55:66 211 | # The IP address 192.168.0.60 212 | #dhcp-host=11:22:33:44:55:66,192.168.0.60 213 | 214 | # Always set the name of the host with hardware address 215 | # 11:22:33:44:55:66 to be "fred" 216 | #dhcp-host=11:22:33:44:55:66,fred 217 | 218 | # Always give the host with Ethernet address 11:22:33:44:55:66 219 | # the name fred and IP address 192.168.0.60 and lease time 45 minutes 220 | #dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m 221 | 222 | # Give a host with Ethernet address 11:22:33:44:55:66 or 223 | # 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume 224 | # that these two Ethernet interfaces will never be in use at the same 225 | # time, and give the IP address to the second, even if it is already 226 | # in use by the first. Useful for laptops with wired and wireless 227 | # addresses. 228 | #dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 229 | 230 | # Give the machine which says its name is "bert" IP address 231 | # 192.168.0.70 and an infinite lease 232 | #dhcp-host=bert,192.168.0.70,infinite 233 | 234 | # Always give the host with client identifier 01:02:02:04 235 | # the IP address 192.168.0.60 236 | #dhcp-host=id:01:02:02:04,192.168.0.60 237 | 238 | # Always give the host with client identifier "marjorie" 239 | # the IP address 192.168.0.60 240 | #dhcp-host=id:marjorie,192.168.0.60 241 | 242 | # Enable the address given for "judge" in /etc/hosts 243 | # to be given to a machine presenting the name "judge" when 244 | # it asks for a DHCP lease. 245 | #dhcp-host=judge 246 | 247 | # Never offer DHCP service to a machine whose Ethernet 248 | # address is 11:22:33:44:55:66 249 | #dhcp-host=11:22:33:44:55:66,ignore 250 | 251 | # Ignore any client-id presented by the machine with Ethernet 252 | # address 11:22:33:44:55:66. This is useful to prevent a machine 253 | # being treated differently when running under different OS's or 254 | # between PXE boot and OS boot. 255 | #dhcp-host=11:22:33:44:55:66,id:* 256 | 257 | # Send extra options which are tagged as "red" to 258 | # the machine with Ethernet address 11:22:33:44:55:66 259 | #dhcp-host=11:22:33:44:55:66,set:red 260 | 261 | # Send extra options which are tagged as "red" to 262 | # any machine with Ethernet address starting 11:22:33: 263 | #dhcp-host=11:22:33:*:*:*,set:red 264 | 265 | # Give a fixed IPv6 address and name to client with 266 | # DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 267 | # Note the MAC addresses CANNOT be used to identify DHCPv6 clients. 268 | # Note also the they [] around the IPv6 address are obilgatory. 269 | #dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] 270 | 271 | # Ignore any clients which are not specified in dhcp-host lines 272 | # or /etc/ethers. Equivalent to ISC "deny unknown-clients". 273 | # This relies on the special "known" tag which is set when 274 | # a host is matched. 275 | #dhcp-ignore=tag:!known 276 | 277 | # Send extra options which are tagged as "red" to any machine whose 278 | # DHCP vendorclass string includes the substring "Linux" 279 | #dhcp-vendorclass=set:red,Linux 280 | 281 | # Send extra options which are tagged as "red" to any machine one 282 | # of whose DHCP userclass strings includes the substring "accounts" 283 | #dhcp-userclass=set:red,accounts 284 | 285 | # Send extra options which are tagged as "red" to any machine whose 286 | # MAC address matches the pattern. 287 | #dhcp-mac=set:red,00:60:8C:*:*:* 288 | 289 | # If this line is uncommented, dnsmasq will read /etc/ethers and act 290 | # on the ethernet-address/IP pairs found there just as if they had 291 | # been given as --dhcp-host options. Useful if you keep 292 | # MAC-address/host mappings there for other purposes. 293 | #read-ethers 294 | 295 | # Send options to hosts which ask for a DHCP lease. 296 | # See RFC 2132 for details of available options. 297 | # Common options can be given to dnsmasq by name: 298 | # run "dnsmasq --help dhcp" to get a list. 299 | # Note that all the common settings, such as netmask and 300 | # broadcast address, DNS server and default route, are given 301 | # sane defaults by dnsmasq. You very likely will not need 302 | # any dhcp-options. If you use Windows clients and Samba, there 303 | # are some options which are recommended, they are detailed at the 304 | # end of this section. 305 | 306 | # Override the default route supplied by dnsmasq, which assumes the 307 | # router is the same machine as the one running dnsmasq. 308 | #dhcp-option=3,1.2.3.4 309 | 310 | # Do the same thing, but using the option name 311 | #dhcp-option=option:router,1.2.3.4 312 | 313 | # Override the default route supplied by dnsmasq and send no default 314 | # route at all. Note that this only works for the options sent by 315 | # default (1, 3, 6, 12, 28) the same line will send a zero-length option 316 | # for all other option numbers. 317 | #dhcp-option=3 318 | 319 | # Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 320 | #dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 321 | 322 | # Send DHCPv6 option. Note [] around IPv6 addresses. 323 | #dhcp-option=option6:dns-server,[1234::77],[1234::88] 324 | 325 | # Send DHCPv6 option for namservers as the machine running 326 | # dnsmasq and another. 327 | #dhcp-option=option6:dns-server,[::],[1234::88] 328 | 329 | # Set the NTP time server address to be the same machine as 330 | # is running dnsmasq 331 | #dhcp-option=42,0.0.0.0 332 | 333 | # Set the NIS domain name to "welly" 334 | #dhcp-option=40,welly 335 | 336 | # Set the default time-to-live to 50 337 | #dhcp-option=23,50 338 | 339 | # Set the "all subnets are local" flag 340 | #dhcp-option=27,1 341 | 342 | # Send the etherboot magic flag and then etherboot options (a string). 343 | #dhcp-option=128,e4:45:74:68:00:00 344 | #dhcp-option=129,NIC=eepro100 345 | 346 | # Specify an option which will only be sent to the "red" network 347 | # (see dhcp-range for the declaration of the "red" network) 348 | # Note that the tag: part must precede the option: part. 349 | #dhcp-option = tag:red, option:ntp-server, 192.168.1.1 350 | 351 | # The following DHCP options set up dnsmasq in the same way as is specified 352 | # for the ISC dhcpcd in 353 | # http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt 354 | # adapted for a typical dnsmasq installation where the host running 355 | # dnsmasq is also the host running samba. 356 | # you may want to uncomment some or all of them if you use 357 | # Windows clients and Samba. 358 | #dhcp-option=19,0 # option ip-forwarding off 359 | #dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) 360 | #dhcp-option=45,0.0.0.0 # netbios datagram distribution server 361 | #dhcp-option=46,8 # netbios node type 362 | 363 | # Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. 364 | #dhcp-option=252,"\n" 365 | 366 | # Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client 367 | # probably doesn't support this...... 368 | #dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com 369 | 370 | # Send RFC-3442 classless static routes (note the netmask encoding) 371 | #dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 372 | 373 | # Send vendor-class specific options encapsulated in DHCP option 43. 374 | # The meaning of the options is defined by the vendor-class so 375 | # options are sent only when the client supplied vendor class 376 | # matches the class given here. (A substring match is OK, so "MSFT" 377 | # matches "MSFT" and "MSFT 5.0"). This example sets the 378 | # mtftp address to 0.0.0.0 for PXEClients. 379 | #dhcp-option=vendor:PXEClient,1,0.0.0.0 380 | 381 | # Send microsoft-specific option to tell windows to release the DHCP lease 382 | # when it shuts down. Note the "i" flag, to tell dnsmasq to send the 383 | # value as a four-byte integer - that's what microsoft wants. See 384 | # http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true 385 | #dhcp-option=vendor:MSFT,2,1i 386 | 387 | # Send the Encapsulated-vendor-class ID needed by some configurations of 388 | # Etherboot to allow is to recognise the DHCP server. 389 | #dhcp-option=vendor:Etherboot,60,"Etherboot" 390 | 391 | # Send options to PXELinux. Note that we need to send the options even 392 | # though they don't appear in the parameter request list, so we need 393 | # to use dhcp-option-force here. 394 | # See http://syslinux.zytor.com/pxe.php#special for details. 395 | # Magic number - needed before anything else is recognised 396 | #dhcp-option-force=208,f1:00:74:7e 397 | # Configuration file name 398 | #dhcp-option-force=209,configs/common 399 | # Path prefix 400 | #dhcp-option-force=210,/tftpboot/pxelinux/files/ 401 | # Reboot time. (Note 'i' to send 32-bit value) 402 | #dhcp-option-force=211,30i 403 | 404 | # Set the boot filename for netboot/PXE. You will only need 405 | # this is you want to boot machines over the network and you will need 406 | # a TFTP server; either dnsmasq's built in TFTP server or an 407 | # external one. (See below for how to enable the TFTP server.) 408 | #dhcp-boot=pxelinux.0 409 | 410 | # The same as above, but use custom tftp-server instead machine running dnsmasq 411 | #dhcp-boot=pxelinux,server.name,192.168.1.100 412 | 413 | # Boot for Etherboot gPXE. The idea is to send two different 414 | # filenames, the first loads gPXE, and the second tells gPXE what to 415 | # load. The dhcp-match sets the gpxe tag for requests from gPXE. 416 | #dhcp-match=set:gpxe,175 # gPXE sends a 175 option. 417 | #dhcp-boot=tag:!gpxe,undionly.kpxe 418 | #dhcp-boot=mybootimage 419 | 420 | # Encapsulated options for Etherboot gPXE. All the options are 421 | # encapsulated within option 175 422 | #dhcp-option=encap:175, 1, 5b # priority code 423 | #dhcp-option=encap:175, 176, 1b # no-proxydhcp 424 | #dhcp-option=encap:175, 177, string # bus-id 425 | #dhcp-option=encap:175, 189, 1b # BIOS drive code 426 | #dhcp-option=encap:175, 190, user # iSCSI username 427 | #dhcp-option=encap:175, 191, pass # iSCSI password 428 | 429 | # Test for the architecture of a netboot client. PXE clients are 430 | # supposed to send their architecture as option 93. (See RFC 4578) 431 | #dhcp-match=peecees, option:client-arch, 0 #x86-32 432 | #dhcp-match=itanics, option:client-arch, 2 #IA64 433 | #dhcp-match=hammers, option:client-arch, 6 #x86-64 434 | #dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 435 | 436 | # Do real PXE, rather than just booting a single file, this is an 437 | # alternative to dhcp-boot. 438 | #pxe-prompt="What system shall I netboot?" 439 | # or with timeout before first available action is taken: 440 | #pxe-prompt="Press F8 for menu.", 60 441 | 442 | # Available boot services. for PXE. 443 | #pxe-service=x86PC, "Boot from local disk" 444 | 445 | # Loads /pxelinux.0 from dnsmasq TFTP server. 446 | #pxe-service=x86PC, "Install Linux", pxelinux 447 | 448 | # Loads /pxelinux.0 from TFTP server at 1.2.3.4. 449 | # Beware this fails on old PXE ROMS. 450 | #pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 451 | 452 | # Use bootserver on network, found my multicast or broadcast. 453 | #pxe-service=x86PC, "Install windows from RIS server", 1 454 | 455 | # Use bootserver at a known IP address. 456 | #pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 457 | 458 | # If you have multicast-FTP available, 459 | # information for that can be passed in a similar way using options 1 460 | # to 5. See page 19 of 461 | # http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf 462 | 463 | 464 | # Enable dnsmasq's built-in TFTP server 465 | #enable-tftp 466 | 467 | # Set the root directory for files available via FTP. 468 | #tftp-root=/var/ftpd 469 | 470 | # Make the TFTP server more secure: with this set, only files owned by 471 | # the user dnsmasq is running as will be send over the net. 472 | #tftp-secure 473 | 474 | # This option stops dnsmasq from negotiating a larger blocksize for TFTP 475 | # transfers. It will slow things down, but may rescue some broken TFTP 476 | # clients. 477 | #tftp-no-blocksize 478 | 479 | # Set the boot file name only when the "red" tag is set. 480 | #dhcp-boot=net:red,pxelinux.red-net 481 | 482 | # An example of dhcp-boot with an external TFTP server: the name and IP 483 | # address of the server are given after the filename. 484 | # Can fail with old PXE ROMS. Overridden by --pxe-service. 485 | #dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 486 | 487 | # If there are multiple external tftp servers having a same name 488 | # (using /etc/hosts) then that name can be specified as the 489 | # tftp_servername (the third option to dhcp-boot) and in that 490 | # case dnsmasq resolves this name and returns the resultant IP 491 | # addresses in round robin fasion. This facility can be used to 492 | # load balance the tftp load among a set of servers. 493 | #dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name 494 | 495 | # Set the limit on DHCP leases, the default is 150 496 | #dhcp-lease-max=150 497 | 498 | # The DHCP server needs somewhere on disk to keep its lease database. 499 | # This defaults to a sane location, but if you want to change it, use 500 | # the line below. 501 | #dhcp-leasefile=/var/lib/misc/dnsmasq.leases 502 | 503 | # Set the DHCP server to authoritative mode. In this mode it will barge in 504 | # and take over the lease for any client which broadcasts on the network, 505 | # whether it has a record of the lease or not. This avoids long timeouts 506 | # when a machine wakes up on a new network. DO NOT enable this if there's 507 | # the slightest chance that you might end up accidentally configuring a DHCP 508 | # server for your campus/company accidentally. The ISC server uses 509 | # the same option, and this URL provides more information: 510 | # http://www.isc.org/files/auth.html 511 | #dhcp-authoritative 512 | 513 | # Run an executable when a DHCP lease is created or destroyed. 514 | # The arguments sent to the script are "add" or "del", 515 | # then the MAC address, the IP address and finally the hostname 516 | # if there is one. 517 | #dhcp-script=/bin/echo 518 | 519 | # Set the cachesize here. 520 | #cache-size=150 521 | 522 | # If you want to disable negative caching, uncomment this. 523 | #no-negcache 524 | 525 | # Normally responses which come form /etc/hosts and the DHCP lease 526 | # file have Time-To-Live set as zero, which conventionally means 527 | # do not cache further. If you are happy to trade lower load on the 528 | # server for potentially stale date, you can set a time-to-live (in 529 | # seconds) here. 530 | #local-ttl= 531 | 532 | # If you want dnsmasq to detect attempts by Verisign to send queries 533 | # to unregistered .com and .net hosts to its sitefinder service and 534 | # have dnsmasq instead return the correct NXDOMAIN response, uncomment 535 | # this line. You can add similar lines to do the same for other 536 | # registries which have implemented wildcard A records. 537 | #bogus-nxdomain=64.94.110.11 538 | 539 | # If you want to fix up DNS results from upstream servers, use the 540 | # alias option. This only works for IPv4. 541 | # This alias makes a result of 1.2.3.4 appear as 5.6.7.8 542 | #alias=1.2.3.4,5.6.7.8 543 | # and this maps 1.2.3.x to 5.6.7.x 544 | #alias=1.2.3.0,5.6.7.0,255.255.255.0 545 | # and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 546 | #alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 547 | 548 | # Change these lines if you want dnsmasq to serve MX records. 549 | 550 | # Return an MX record named "maildomain.com" with target 551 | # servermachine.com and preference 50 552 | #mx-host=maildomain.com,servermachine.com,50 553 | 554 | # Set the default target for MX records created using the localmx option. 555 | #mx-target=servermachine.com 556 | 557 | # Return an MX record pointing to the mx-target for all local 558 | # machines. 559 | #localmx 560 | 561 | # Return an MX record pointing to itself for all local machines. 562 | #selfmx 563 | 564 | # Change the following lines if you want dnsmasq to serve SRV 565 | # records. These are useful if you want to serve ldap requests for 566 | # Active Directory and other windows-originated DNS requests. 567 | # See RFC 2782. 568 | # You may add multiple srv-host lines. 569 | # The fields are ,,,, 570 | # If the domain part if missing from the name (so that is just has the 571 | # service and protocol sections) then the domain given by the domain= 572 | # config option is used. (Note that expand-hosts does not need to be 573 | # set for this to work.) 574 | 575 | # A SRV record sending LDAP for the example.com domain to 576 | # ldapserver.example.com port 389 577 | #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 578 | 579 | # A SRV record sending LDAP for the example.com domain to 580 | # ldapserver.example.com port 389 (using domain=) 581 | #domain=example.com 582 | #srv-host=_ldap._tcp,ldapserver.example.com,389 583 | 584 | # Two SRV records for LDAP, each with different priorities 585 | #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 586 | #srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 587 | 588 | # A SRV record indicating that there is no LDAP server for the domain 589 | # example.com 590 | #srv-host=_ldap._tcp.example.com 591 | 592 | # The following line shows how to make dnsmasq serve an arbitrary PTR 593 | # record. This is useful for DNS-SD. (Note that the 594 | # domain-name expansion done for SRV records _does_not 595 | # occur for PTR records.) 596 | #ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" 597 | 598 | # Change the following lines to enable dnsmasq to serve TXT records. 599 | # These are used for things like SPF and zeroconf. (Note that the 600 | # domain-name expansion done for SRV records _does_not 601 | # occur for TXT records.) 602 | 603 | #Example SPF. 604 | #txt-record=example.com,"v=spf1 a -all" 605 | 606 | #Example zeroconf 607 | #txt-record=_http._tcp.example.com,name=value,paper=A4 608 | 609 | # Provide an alias for a "local" DNS name. Note that this _only_ works 610 | # for targets which are names from DHCP or /etc/hosts. Give host 611 | # "bert" another name, bertrand 612 | #cname=bertand,bert 613 | 614 | # For debugging purposes, log each DNS query as it passes through 615 | # dnsmasq. 616 | #log-queries 617 | 618 | # Log lots of extra information about DHCP transactions. 619 | #log-dhcp 620 | 621 | # Include a another lot of configuration options. 622 | #conf-file=/etc/dnsmasq.more.conf 623 | conf-dir=/etc/dnsmasq.d -------------------------------------------------------------------------------- /data/dnsmasq/dnsmasq.d/addresses.conf: -------------------------------------------------------------------------------- 1 | address=/www.gravatar.com/68.232.44.121 2 | address=/dnscrypt.org/91.121.49.42 3 | address=/packagist.org/87.98.253.214 4 | address=/www.instapaper.com/50.112.255.195 5 | address=/rubygems.org/54.186.104.15 6 | address=/laravel.com/104.131.25.42 7 | address=/disqus.com/23.235.37.134 8 | address=/ocsp.digicert.com/117.18.237.29 9 | address=/crl3.digicert.com/117.18.237.29 10 | address=/crl4.digicert.com/204.93.150.151 11 | address=/rubydoc.info/173.255.227.96 12 | address=/onedrive.live.com/204.79.197.217 13 | address=/chat-main.hipchat.com/107.22.12.221 14 | address=/instagram.com/54.236.117.198 15 | -------------------------------------------------------------------------------- /data/dnsmasq/dnsmasq.d/forwarded.conf: -------------------------------------------------------------------------------- 1 | server=/akamai.net/127.0.0.1#5353 2 | server=/akamaihd.net/127.0.0.1#5353 3 | server=/amazonaws.com/127.0.0.1#5353 4 | server=/android.com/127.0.0.1#5353 5 | server=/appspot.com/127.0.0.1#5353 6 | server=/blogger.com/127.0.0.1#5353 7 | server=/blogspot.com/127.0.0.1#5353 8 | server=/chrome.com/127.0.0.1#5353 9 | server=/chromium.org/127.0.0.1#5353 10 | server=/cloudfront.net/127.0.0.1#5353 11 | server=/dropbox.com/127.0.0.1#5353 12 | server=/dropboxusercontent.com/127.0.0.1#5353 13 | server=/edgecastcdn.net/127.0.0.1#5353 14 | server=/edgesuite.net/127.0.0.1#5353 15 | server=/facebook.com/127.0.0.1#5353 16 | server=/fastly.net/127.0.0.1#5353 17 | server=/fbcdn.net/127.0.0.1#5353 18 | server=/feedburner.com/127.0.0.1#5353 19 | server=/g.co/127.0.0.1#5353 20 | server=/ggpht.com/127.0.0.1#5353 21 | server=/github.com/127.0.0.1#5353 22 | server=/gmail.com/127.0.0.1#5353 23 | server=/golang.org/127.0.0.1#5353 24 | server=/goo.gl/127.0.0.1#5353 25 | server=/google-analytics.com/127.0.0.1#5353 26 | server=/google.co.jp/127.0.0.1#5353 27 | server=/google.com/127.0.0.1#5353 28 | server=/google.com.hk/127.0.0.1#5353 29 | server=/googleadservices.com/127.0.0.1#5353 30 | server=/googleapis.com/127.0.0.1#5353 31 | server=/googlecode.com/127.0.0.1#5353 32 | server=/googledrive.com/127.0.0.1#5353 33 | server=/googlehosted.com/127.0.0.1#5353 34 | server=/googlelabs.com/127.0.0.1#5353 35 | server=/googlemail.com/127.0.0.1#5353 36 | server=/googlesource.com/127.0.0.1#5353 37 | server=/googlesyndication.com/127.0.0.1#5353 38 | server=/googleusercontent.com/127.0.0.1#5353 39 | server=/googlevideo.com/127.0.0.1#5353 40 | server=/googlezip.net/127.0.0.1#5353 41 | server=/gravatar.com/127.0.0.1#5353 42 | server=/gstatic.com/127.0.0.1#5353 43 | server=/instagram.com/127.0.0.1#5353 44 | server=/t.co/127.0.0.1#5353 45 | server=/twimg.com/127.0.0.1#5353 46 | server=/twitter.com/127.0.0.1#5353 47 | server=/wikipedia.org/127.0.0.1#5353 48 | server=/youtube.com/127.0.0.1#5353 49 | server=/ytimg.com/127.0.0.1#5353 -------------------------------------------------------------------------------- /data/ip-ranges.json: -------------------------------------------------------------------------------- 1 | [ 2 | "1.0.0.0/24", 3 | "1.1.1.0/24", 4 | "1.2.3.0/24", 5 | "2.16.0.0/13", 6 | "4.77.205.0/24", 7 | "5.104.64.0/21", 8 | "8.3.30.0/24", 9 | "8.5.249.0/24", 10 | "8.5.250.0/24", 11 | "8.6.48.0/21", 12 | "8.6.96.0/24", 13 | "8.8.4.0/24", 14 | "8.8.8.0/24", 15 | "8.8.64.0/24", 16 | "8.15.15.0/24", 17 | "8.15.202.0/24", 18 | "8.25.194.0/23", 19 | "8.25.196.0/23", 20 | "8.34.208.0/20", 21 | "8.35.192.0/20", 22 | "12.202.248.0/24", 23 | "12.216.80.0/24", 24 | "23.0.0.0/12", 25 | "23.20.0.0/14", 26 | "23.32.0.0/11", 27 | "23.64.0.0/14", 28 | "23.72.0.0/13", 29 | "23.192.0.0/11", 30 | "23.235.32.0/20", 31 | "23.236.48.0/20", 32 | "23.249.49.0/24", 33 | "23.249.55.0/24", 34 | "23.251.128.0/19", 35 | "27.0.0.0/22", 36 | "27.116.32.0/23", 37 | "31.13.24.0/21", 38 | "31.13.64.0/18", 39 | "38.113.220.0/24", 40 | "41.193.163.0/24", 41 | "42.99.160.0/23", 42 | "42.99.162.0/24", 43 | "43.249.72.0/22", 44 | "43.250.192.0/23", 45 | "43.254.120.0/22", 46 | "45.58.64.0/20", 47 | "45.64.40.0/22", 48 | "45.121.228.0/22", 49 | "46.22.64.0/20", 50 | "46.28.246.0/23", 51 | "46.51.128.0/18", 52 | "46.51.192.0/20", 53 | "46.51.216.0/21", 54 | "46.51.224.0/19", 55 | "46.137.0.0/16", 56 | "50.16.0.0/14", 57 | "50.112.0.0/16", 58 | "52.0.0.0/13", 59 | "52.8.0.0/16", 60 | "52.10.0.0/15", 61 | "52.12.0.0/15", 62 | "52.16.0.0/13", 63 | "52.24.0.0/14", 64 | "52.28.0.0/15", 65 | "52.64.0.0/16", 66 | "52.68.0.0/14", 67 | "52.72.0.0/15", 68 | "52.74.0.0/16", 69 | "52.76.0.0/17", 70 | "52.86.0.0/15", 71 | "52.88.0.0/14", 72 | "52.95.34.0/23", 73 | "52.95.36.0/22", 74 | "52.95.48.0/21", 75 | "52.95.56.0/22", 76 | "52.95.240.0/21", 77 | "52.95.248.0/24", 78 | "52.95.255.0/25", 79 | "52.95.255.128/28", 80 | "54.64.0.0/11", 81 | "54.144.0.0/12", 82 | "54.160.0.0/12", 83 | "54.176.0.0/14", 84 | "54.182.0.0/15", 85 | "54.184.0.0/13", 86 | "54.192.0.0/12", 87 | "54.208.0.0/13", 88 | "54.216.0.0/14", 89 | "54.220.0.0/15", 90 | "54.224.0.0/14", 91 | "54.228.0.0/15", 92 | "54.230.0.0/16", 93 | "54.231.0.0/17", 94 | "54.231.128.0/18", 95 | "54.231.192.0/20", 96 | "54.231.224.0/20", 97 | "54.231.240.0/21", 98 | "54.231.252.0/23", 99 | "54.231.254.0/24", 100 | "54.232.0.0/14", 101 | "54.236.0.0/15", 102 | "54.238.0.0/16", 103 | "54.239.2.0/23", 104 | "54.239.4.0/22", 105 | "54.239.8.0/21", 106 | "54.239.16.0/20", 107 | "54.239.32.0/21", 108 | "54.239.48.0/20", 109 | "54.239.96.0/24", 110 | "54.239.98.0/23", 111 | "54.239.100.0/23", 112 | "54.239.104.0/23", 113 | "54.239.108.0/22", 114 | "54.239.114.0/24", 115 | "54.239.128.0/18", 116 | "54.239.192.0/19", 117 | "54.240.128.0/18", 118 | "54.240.192.0/21", 119 | "54.240.200.0/24", 120 | "54.240.202.0/23", 121 | "54.240.204.0/22", 122 | "54.240.216.0/21", 123 | "54.240.225.0/24", 124 | "54.240.226.0/23", 125 | "54.240.230.0/23", 126 | "54.240.232.0/21", 127 | "54.240.240.0/24", 128 | "54.240.244.0/22", 129 | "54.240.248.0/21", 130 | "54.241.0.0/16", 131 | "54.242.0.0/15", 132 | "54.244.0.0/14", 133 | "54.248.0.0/13", 134 | "59.151.128.0/18", 135 | "60.254.128.0/18", 136 | "61.213.191.8/30", 137 | "63.84.59.0/24", 138 | "63.85.36.0/24", 139 | "63.116.109.0/24", 140 | "63.119.76.0/24", 141 | "63.126.84.0/24", 142 | "63.141.194.0/25", 143 | "63.141.196.128/25", 144 | "63.146.70.0/24", 145 | "63.150.12.0/24", 146 | "63.208.195.0/24", 147 | "63.210.101.0/24", 148 | "63.210.131.0/24", 149 | "63.210.173.0/24", 150 | "63.215.198.96/32", 151 | "63.217.8.0/24", 152 | "63.217.232.0/24", 153 | "63.233.60.0/23", 154 | "64.9.224.0/19", 155 | "64.15.112.0/20", 156 | "64.86.132.0/24", 157 | "64.124.187.0/24", 158 | "64.124.214.0/24", 159 | "64.125.118.0/23", 160 | "64.152.108.0/24", 161 | "64.157.40.192/26", 162 | "64.208.48.0/25", 163 | "64.208.174.0/24", 164 | "64.208.187.0/24", 165 | "64.211.58.0/24", 166 | "64.212.114.0/23", 167 | "64.232.138.0/24", 168 | "64.232.206.0/24", 169 | "64.233.160.0/19", 170 | "65.19.187.0/24", 171 | "65.59.160.0/24", 172 | "65.202.32.0/22", 173 | "66.38.171.0/24", 174 | "66.38.185.0/24", 175 | "66.102.0.0/20", 176 | "66.160.145.0/24", 177 | "66.171.231.0/25", 178 | "66.198.8.0/24", 179 | "66.220.21.0/24", 180 | "66.220.144.0/20", 181 | "66.235.119.0/24", 182 | "66.249.64.0/19", 183 | "67.131.232.0/24", 184 | "67.202.0.0/18", 185 | "68.232.32.0/20", 186 | "69.12.56.0/21", 187 | "69.26.179.0/24", 188 | "69.26.180.0/24", 189 | "69.27.160.0/20", 190 | "69.31.20.0/24", 191 | "69.31.21.0/25", 192 | "69.31.106.0/23", 193 | "69.31.119.128/25", 194 | "69.45.79.0/24", 195 | "69.45.84.0/23", 196 | "69.45.86.0/24", 197 | "69.63.176.0/20", 198 | "69.171.224.0/19", 199 | "69.192.0.0/16", 200 | "70.32.128.0/19", 201 | "70.39.139.0/25", 202 | "72.14.192.0/18", 203 | "72.21.80.0/20", 204 | "72.21.192.0/19", 205 | "72.44.32.0/19", 206 | "72.246.0.0/15", 207 | "74.113.232.0/21", 208 | "74.119.76.0/22", 209 | "74.125.0.0/16", 210 | "75.101.128.0/17", 211 | "79.125.0.0/17", 212 | "80.67.64.0/19", 213 | "81.20.72.128/25", 214 | "81.25.198.128/25", 215 | "81.25.206.128/25", 216 | "81.93.191.0/24", 217 | "81.93.208.0/26", 218 | "82.112.106.0/24", 219 | "83.217.226.0/24", 220 | "84.24.64.0/20", 221 | "84.53.128.0/18", 222 | "87.98.253.214/32", 223 | "87.238.80.0/21", 224 | "88.221.0.0/16", 225 | "89.207.224.0/21", 226 | "91.121.49.42/32", 227 | "92.122.0.0/15", 228 | "93.184.208.0/20", 229 | "93.191.175.0/24", 230 | "95.100.0.0/15", 231 | "96.6.0.0/15", 232 | "96.16.0.0/15", 233 | "96.127.0.0/17", 234 | "98.142.96.0/20", 235 | "103.4.8.0/21", 236 | "103.4.96.0/22", 237 | "103.21.244.0/22", 238 | "103.22.200.0/22", 239 | "103.31.4.0/22", 240 | "103.62.64.0/22", 241 | "103.238.148.0/22", 242 | "103.244.50.0/24", 243 | "103.245.222.0/23", 244 | "103.245.224.0/24", 245 | "103.246.148.0/22", 246 | "103.252.112.0/22", 247 | "104.16.0.0/12", 248 | "104.64.0.0/10", 249 | "104.131.25.42/32", 250 | "104.132.0.0/14", 251 | "104.154.0.0/15", 252 | "104.156.80.0/20", 253 | "104.196.0.0/14", 254 | "104.237.161.0/24", 255 | "104.237.162.0/23", 256 | "104.237.164.0/23", 257 | "104.237.174.0/24", 258 | "104.237.188.0/23", 259 | "104.237.191.0/24", 260 | "104.244.40.0/21", 261 | "107.20.0.0/14", 262 | "107.167.160.0/19", 263 | "107.178.192.0/18", 264 | "108.59.80.0/20", 265 | "108.160.160.0/20", 266 | "108.161.240.0/20", 267 | "108.162.192.0/18", 268 | "108.170.192.0/18", 269 | "108.177.0.0/17", 270 | "110.164.15.0/24", 271 | "110.232.176.0/22", 272 | "113.197.104.0/22", 273 | "117.18.232.0/21", 274 | "117.103.183.0/24", 275 | "118.214.0.0/15", 276 | "121.78.191.0/24", 277 | "121.156.59.224/27", 278 | "122.248.192.0/18", 279 | "122.252.32.0/19", 280 | "122.252.128.0/20", 281 | "124.155.192.0/24", 282 | "125.56.128.0/17", 283 | "125.252.192.0/18", 284 | "128.241.89.0/24", 285 | "128.241.91.0/24", 286 | "128.241.218.0/24", 287 | "128.241.221.0/24", 288 | "129.134.0.0/16", 289 | "130.211.0.0/16", 290 | "141.101.64.0/18", 291 | "142.250.0.0/15", 292 | "146.82.98.0/24", 293 | "146.148.0.0/17", 294 | "152.195.0.0/16", 295 | "157.52.64.0/18", 296 | "157.238.74.0/23", 297 | "157.240.0.0/16", 298 | "162.158.0.0/15", 299 | "162.216.148.0/22", 300 | "162.222.176.0/21", 301 | "165.193.245.0/24", 302 | "165.254.1.0/25", 303 | "165.254.27.64/26", 304 | "165.254.32.0/23", 305 | "165.254.40.0/23", 306 | "165.254.52.0/24", 307 | "165.254.94.0/23", 308 | "165.254.99.0/24", 309 | "165.254.127.0/24", 310 | "165.254.133.0/24", 311 | "165.254.137.64/26", 312 | "165.254.156.0/23", 313 | "165.254.158.0/25", 314 | "165.254.159.128/25", 315 | "165.254.202.64/26", 316 | "165.254.202.128/26", 317 | "165.254.204.0/23", 318 | "165.254.245.0/25", 319 | "166.90.81.0/24", 320 | "166.90.150.0/24", 321 | "166.90.208.166/32", 322 | "168.143.240.0/22", 323 | "168.143.255.0/24", 324 | "172.64.0.0/13", 325 | "172.102.8.0/21", 326 | "172.110.32.0/21", 327 | "172.111.64.0/18", 328 | "172.217.0.0/16", 329 | "172.224.0.0/12", 330 | "172.247.176.0/20", 331 | "172.253.0.0/16", 332 | "173.194.0.0/16", 333 | "173.222.0.0/15", 334 | "173.245.48.0/20", 335 | "173.252.64.0/18", 336 | "173.255.112.0/20", 337 | "173.255.227.96/32", 338 | "174.129.0.0/16", 339 | "175.41.128.0/17", 340 | "176.32.64.0/19", 341 | "176.32.96.0/20", 342 | "176.32.112.0/21", 343 | "176.32.120.0/22", 344 | "176.32.125.0/25", 345 | "176.34.0.0/16", 346 | "177.71.128.0/17", 347 | "177.72.240.0/21", 348 | "178.236.0.0/20", 349 | "179.60.192.0/22", 350 | "182.50.0.0/19", 351 | "182.50.32.0/20", 352 | "184.24.0.0/13", 353 | "184.46.152.0/22", 354 | "184.50.0.0/15", 355 | "184.72.0.0/15", 356 | "184.84.0.0/14", 357 | "184.169.128.0/17", 358 | "184.214.32.0/20", 359 | "185.25.28.0/22", 360 | "185.31.16.0/22", 361 | "185.45.4.0/22", 362 | "185.45.9.0/24", 363 | "185.45.10.0/23", 364 | "185.48.120.0/22", 365 | "185.60.216.0/22", 366 | "188.114.96.0/20", 367 | "190.2.175.0/24", 368 | "190.93.240.0/20", 369 | "192.16.0.0/18", 370 | "192.30.0.0/19", 371 | "192.30.252.0/22", 372 | "192.44.68.0/23", 373 | "192.48.236.0/23", 374 | "192.70.222.0/24", 375 | "192.104.160.0/23", 376 | "192.133.76.0/22", 377 | "192.158.28.0/22", 378 | "192.178.0.0/15", 379 | "192.198.184.0/21", 380 | "192.204.3.0/24", 381 | "192.204.4.0/24", 382 | "192.229.128.0/17", 383 | "193.33.4.0/23", 384 | "193.108.88.0/21", 385 | "193.108.152.0/22", 386 | "193.142.125.0/24", 387 | "193.200.222.0/24", 388 | "194.110.194.0/24", 389 | "194.122.80.0/22", 390 | "195.57.81.0/24", 391 | "195.57.152.0/23", 392 | "195.95.192.0/22", 393 | "195.245.124.0/24", 394 | "195.245.126.0/23", 395 | "197.234.240.0/22", 396 | "198.7.16.0/20", 397 | "198.35.26.0/23", 398 | "198.41.128.0/17", 399 | "198.47.108.0/25", 400 | "198.87.51.0/24", 401 | "198.93.38.0/24", 402 | "198.144.112.0/24", 403 | "199.16.156.0/22", 404 | "199.27.72.0/21", 405 | "199.27.128.0/21", 406 | "199.36.100.0/22", 407 | "199.47.216.0/22", 408 | "199.48.106.0/24", 409 | "199.59.148.0/22", 410 | "199.96.56.0/21", 411 | "199.192.112.0/22", 412 | "199.201.64.0/22", 413 | "199.204.24.0/22", 414 | "199.223.232.0/21", 415 | "199.239.25.0/24", 416 | "200.136.36.0/24", 417 | "201.220.10.0/24", 418 | "203.25.23.0/24", 419 | "203.30.14.0/24", 420 | "203.31.242.0/24", 421 | "203.63.146.0/24", 422 | "203.69.138.0/24", 423 | "203.69.141.0/24", 424 | "203.83.220.0/22", 425 | "203.221.109.0/24", 426 | "204.0.54.0/23", 427 | "204.2.148.128/25", 428 | "204.2.163.64/26", 429 | "204.2.187.0/24", 430 | "204.2.199.0/24", 431 | "204.2.215.0/24", 432 | "204.8.48.0/22", 433 | "204.10.28.0/22", 434 | "204.15.20.0/22", 435 | "204.79.197.217/32", 436 | "204.93.46.0/23", 437 | "204.93.150.151/32", 438 | "204.236.128.0/17", 439 | "204.245.23.0/24", 440 | "204.245.143.0/25", 441 | "204.245.152.64/26", 442 | "204.245.190.0/25", 443 | "204.246.160.0/21", 444 | "204.246.168.0/22", 445 | "204.246.174.0/23", 446 | "204.246.176.0/20", 447 | "204.246.230.0/24", 448 | "205.251.192.0/19", 449 | "205.251.224.0/20", 450 | "205.251.240.0/22", 451 | "205.251.244.0/23", 452 | "205.251.247.0/24", 453 | "205.251.248.0/21", 454 | "206.55.4.128/25", 455 | "206.57.28.0/24", 456 | "206.132.122.0/24", 457 | "206.161.222.0/23", 458 | "206.239.100.0/23", 459 | "207.126.107.0/24", 460 | "207.151.118.128/25", 461 | "207.171.160.0/19", 462 | "207.223.160.0/20", 463 | "207.251.96.0/24", 464 | "208.48.0.0/24", 465 | "208.50.100.0/24", 466 | "208.65.152.0/22", 467 | "208.80.152.0/22", 468 | "208.117.224.0/19", 469 | "209.85.128.0/17", 470 | "209.200.128.0/23", 471 | "209.200.130.0/24", 472 | "209.249.114.0/23", 473 | "210.8.28.0/23", 474 | "210.9.71.0/24", 475 | "210.9.135.192/26", 476 | "210.11.208.0/22", 477 | "210.11.212.0/23", 478 | "210.61.248.0/23", 479 | "211.175.153.0/24", 480 | "212.119.27.0/25", 481 | "213.198.95.128/25", 482 | "213.198.96.0/24", 483 | "216.58.192.0/19", 484 | "216.137.32.0/19", 485 | "216.156.213.0/24", 486 | "216.156.242.0/24", 487 | "216.182.224.0/20", 488 | "216.187.88.0/23", 489 | "216.200.69.0/24", 490 | "216.206.12.128/26", 491 | "216.206.30.0/24", 492 | "216.216.127.0/24", 493 | "216.218.251.0/24", 494 | "216.239.32.0/19", 495 | "216.252.220.0/22", 496 | "219.76.11.0/24", 497 | "219.76.14.0/26" 498 | ] -------------------------------------------------------------------------------- /data/ip-ranges/akamai.json: -------------------------------------------------------------------------------- 1 | [ 2 | "2.16.0.0/13", 3 | "4.77.205.0/24", 4 | "23.0.0.0/12", 5 | "23.32.0.0/11", 6 | "23.64.0.0/14", 7 | "23.72.0.0/13", 8 | "23.192.0.0/11", 9 | "27.116.32.0/23", 10 | "38.113.220.0/24", 11 | "41.193.163.0/24", 12 | "43.254.120.0/22", 13 | "59.151.128.0/18", 14 | "60.254.128.0/18", 15 | "63.84.59.0/24", 16 | "63.85.36.0/24", 17 | "63.116.109.0/24", 18 | "63.119.76.0/24", 19 | "63.126.84.0/24", 20 | "63.141.194.0/25", 21 | "63.141.196.128/25", 22 | "63.146.70.0/24", 23 | "63.150.12.0/24", 24 | "63.208.195.0/24", 25 | "63.210.101.0/24", 26 | "63.210.173.0/24", 27 | "63.215.198.96/32", 28 | "63.217.8.0/24", 29 | "63.217.232.0/24", 30 | "63.233.60.0/23", 31 | "64.86.132.0/24", 32 | "64.124.187.0/24", 33 | "64.124.214.0/24", 34 | "64.125.118.0/23", 35 | "64.152.108.0/24", 36 | "64.157.40.192/26", 37 | "64.208.48.0/25", 38 | "64.208.174.0/24", 39 | "64.208.187.0/24", 40 | "64.211.58.0/24", 41 | "64.212.114.0/23", 42 | "64.232.138.0/24", 43 | "64.232.206.0/24", 44 | "65.19.187.0/24", 45 | "65.59.160.0/24", 46 | "65.202.32.0/22", 47 | "66.38.171.0/24", 48 | "66.38.185.0/24", 49 | "66.160.145.0/24", 50 | "66.171.231.0/25", 51 | "66.198.8.0/24", 52 | "66.220.21.0/24", 53 | "67.131.232.0/24", 54 | "69.26.179.0/24", 55 | "69.26.180.0/24", 56 | "69.27.160.0/20", 57 | "69.31.20.0/24", 58 | "69.31.21.0/25", 59 | "69.31.106.0/23", 60 | "69.31.119.128/25", 61 | "69.45.79.0/24", 62 | "69.45.84.0/23", 63 | "69.45.86.0/24", 64 | "69.192.0.0/16", 65 | "70.39.139.0/25", 66 | "72.246.0.0/15", 67 | "80.67.64.0/19", 68 | "81.20.72.128/25", 69 | "81.25.198.128/25", 70 | "81.25.206.128/25", 71 | "81.93.191.0/24", 72 | "81.93.208.0/26", 73 | "82.112.106.0/24", 74 | "83.217.226.0/24", 75 | "84.24.64.0/20", 76 | "84.53.128.0/18", 77 | "88.221.0.0/16", 78 | "92.122.0.0/15", 79 | "93.191.175.0/24", 80 | "95.100.0.0/15", 81 | "96.6.0.0/15", 82 | "96.16.0.0/15", 83 | "98.142.96.0/20", 84 | "103.238.148.0/22", 85 | "104.64.0.0/10", 86 | "110.164.15.0/24", 87 | "118.214.0.0/15", 88 | "121.78.191.0/24", 89 | "122.252.32.0/19", 90 | "122.252.128.0/20", 91 | "124.155.192.0/24", 92 | "125.56.128.0/17", 93 | "125.252.192.0/18", 94 | "128.241.89.0/24", 95 | "128.241.91.0/24", 96 | "128.241.218.0/24", 97 | "128.241.221.0/24", 98 | "146.82.98.0/24", 99 | "157.238.74.0/23", 100 | "165.254.1.0/25", 101 | "165.254.27.64/26", 102 | "165.254.32.0/23", 103 | "165.254.40.0/23", 104 | "165.254.52.0/24", 105 | "165.254.94.0/23", 106 | "165.254.99.0/24", 107 | "165.254.127.0/24", 108 | "165.254.133.0/24", 109 | "165.254.137.64/26", 110 | "165.254.156.0/23", 111 | "165.254.158.0/25", 112 | "165.254.159.128/25", 113 | "165.254.202.64/26", 114 | "165.254.202.128/26", 115 | "165.254.204.0/23", 116 | "165.254.245.0/25", 117 | "166.90.150.0/24", 118 | "166.90.208.166/32", 119 | "168.143.240.0/22", 120 | "168.143.255.0/24", 121 | "172.224.0.0/12", 122 | "172.247.176.0/20", 123 | "173.222.0.0/15", 124 | "182.50.0.0/19", 125 | "182.50.32.0/20", 126 | "184.24.0.0/13", 127 | "184.46.152.0/22", 128 | "184.50.0.0/15", 129 | "184.84.0.0/14", 130 | "184.214.32.0/20", 131 | "190.2.175.0/24", 132 | "192.70.222.0/24", 133 | "192.204.3.0/24", 134 | "192.204.4.0/24", 135 | "193.108.88.0/21", 136 | "193.108.152.0/22", 137 | "195.57.81.0/24", 138 | "195.57.152.0/23", 139 | "195.95.192.0/22", 140 | "195.245.124.0/24", 141 | "195.245.126.0/23", 142 | "198.47.108.0/25", 143 | "198.87.51.0/24", 144 | "198.93.38.0/24", 145 | "198.144.112.0/24", 146 | "199.48.106.0/24", 147 | "199.239.25.0/24", 148 | "200.136.36.0/24", 149 | "201.220.10.0/24", 150 | "203.25.23.0/24", 151 | "203.30.14.0/24", 152 | "203.31.242.0/24", 153 | "203.63.146.0/24", 154 | "203.69.138.0/24", 155 | "203.69.141.0/24", 156 | "203.221.109.0/24", 157 | "204.0.54.0/23", 158 | "204.2.148.128/25", 159 | "204.2.163.64/26", 160 | "204.2.187.0/24", 161 | "204.2.199.0/24", 162 | "204.2.215.0/24", 163 | "204.8.48.0/22", 164 | "204.10.28.0/22", 165 | "204.93.46.0/23", 166 | "204.245.23.0/24", 167 | "204.245.143.0/25", 168 | "204.245.152.64/26", 169 | "204.245.190.0/25", 170 | "204.246.230.0/24", 171 | "206.55.4.128/25", 172 | "206.57.28.0/24", 173 | "206.132.122.0/24", 174 | "206.161.222.0/23", 175 | "206.239.100.0/23", 176 | "207.126.107.0/24", 177 | "207.151.118.128/25", 178 | "208.48.0.0/24", 179 | "208.50.100.0/24", 180 | "209.200.128.0/23", 181 | "209.200.130.0/24", 182 | "209.249.114.0/23", 183 | "210.8.28.0/23", 184 | "210.9.71.0/24", 185 | "210.9.135.192/26", 186 | "210.11.208.0/22", 187 | "210.11.212.0/23", 188 | "210.61.248.0/23", 189 | "211.175.153.0/24", 190 | "212.119.27.0/25", 191 | "213.198.95.128/25", 192 | "213.198.96.0/24", 193 | "216.156.213.0/24", 194 | "216.156.242.0/24", 195 | "216.187.88.0/23", 196 | "216.200.69.0/24", 197 | "216.206.12.128/26", 198 | "216.206.30.0/24", 199 | "216.216.127.0/24", 200 | "216.218.251.0/24", 201 | "219.76.11.0/24", 202 | "219.76.14.0/26" 203 | ] -------------------------------------------------------------------------------- /data/ip-ranges/aws.json: -------------------------------------------------------------------------------- 1 | [ 2 | "23.20.0.0/14", 3 | "27.0.0.0/22", 4 | "43.250.192.0/24", 5 | "43.250.193.0/24", 6 | "46.51.128.0/18", 7 | "46.51.192.0/20", 8 | "46.51.216.0/21", 9 | "46.51.224.0/19", 10 | "46.137.0.0/17", 11 | "46.137.128.0/18", 12 | "46.137.192.0/19", 13 | "46.137.224.0/19", 14 | "50.16.0.0/15", 15 | "50.18.0.0/16", 16 | "50.19.0.0/16", 17 | "50.112.0.0/16", 18 | "52.0.0.0/15", 19 | "52.2.0.0/15", 20 | "52.4.0.0/14", 21 | "52.8.0.0/16", 22 | "52.10.0.0/15", 23 | "52.12.0.0/15", 24 | "52.16.0.0/15", 25 | "52.18.0.0/16", 26 | "52.19.0.0/17", 27 | "52.19.128.0/18", 28 | "52.19.192.0/19", 29 | "52.19.224.0/20", 30 | "52.19.240.0/20", 31 | "52.20.0.0/14", 32 | "52.24.0.0/14", 33 | "52.28.0.0/16", 34 | "52.29.0.0/16", 35 | "52.64.0.0/17", 36 | "52.64.128.0/17", 37 | "52.68.0.0/15", 38 | "52.70.0.0/15", 39 | "52.72.0.0/15", 40 | "52.74.0.0/16", 41 | "52.76.0.0/17", 42 | "52.86.0.0/15", 43 | "52.88.0.0/15", 44 | "52.90.0.0/15", 45 | "52.95.34.0/24", 46 | "52.95.35.0/24", 47 | "52.95.36.0/22", 48 | "52.95.48.0/22", 49 | "52.95.52.0/22", 50 | "52.95.56.0/22", 51 | "52.95.240.0/24", 52 | "52.95.241.0/24", 53 | "52.95.242.0/24", 54 | "52.95.243.0/24", 55 | "52.95.244.0/24", 56 | "52.95.245.0/24", 57 | "52.95.246.0/24", 58 | "52.95.247.0/24", 59 | "52.95.248.0/24", 60 | "52.95.255.0/28", 61 | "52.95.255.16/28", 62 | "52.95.255.32/28", 63 | "52.95.255.48/28", 64 | "52.95.255.64/28", 65 | "52.95.255.80/28", 66 | "52.95.255.96/28", 67 | "52.95.255.112/28", 68 | "52.95.255.128/28", 69 | "54.64.0.0/15", 70 | "54.66.0.0/16", 71 | "54.67.0.0/16", 72 | "54.68.0.0/14", 73 | "54.72.0.0/15", 74 | "54.74.0.0/15", 75 | "54.76.0.0/15", 76 | "54.78.0.0/16", 77 | "54.79.0.0/16", 78 | "54.80.0.0/13", 79 | "54.88.0.0/14", 80 | "54.92.0.0/17", 81 | "54.92.128.0/17", 82 | "54.93.0.0/16", 83 | "54.94.0.0/16", 84 | "54.95.0.0/16", 85 | "54.144.0.0/14", 86 | "54.148.0.0/15", 87 | "54.150.0.0/16", 88 | "54.151.0.0/17", 89 | "54.151.128.0/17", 90 | "54.152.0.0/16", 91 | "54.153.0.0/17", 92 | "54.153.128.0/17", 93 | "54.154.0.0/16", 94 | "54.155.0.0/16", 95 | "54.156.0.0/14", 96 | "54.160.0.0/13", 97 | "54.168.0.0/16", 98 | "54.169.0.0/16", 99 | "54.170.0.0/15", 100 | "54.172.0.0/15", 101 | "54.174.0.0/15", 102 | "54.176.0.0/15", 103 | "54.178.0.0/16", 104 | "54.179.0.0/16", 105 | "54.182.0.0/16", 106 | "54.183.0.0/16", 107 | "54.184.0.0/13", 108 | "54.192.0.0/16", 109 | "54.193.0.0/16", 110 | "54.194.0.0/15", 111 | "54.196.0.0/15", 112 | "54.198.0.0/16", 113 | "54.199.0.0/16", 114 | "54.200.0.0/15", 115 | "54.202.0.0/15", 116 | "54.204.0.0/15", 117 | "54.206.0.0/16", 118 | "54.207.0.0/16", 119 | "54.208.0.0/15", 120 | "54.210.0.0/15", 121 | "54.212.0.0/15", 122 | "54.214.0.0/16", 123 | "54.215.0.0/16", 124 | "54.216.0.0/15", 125 | "54.218.0.0/16", 126 | "54.219.0.0/16", 127 | "54.220.0.0/16", 128 | "54.221.0.0/16", 129 | "54.224.0.0/15", 130 | "54.226.0.0/15", 131 | "54.228.0.0/16", 132 | "54.229.0.0/16", 133 | "54.230.0.0/16", 134 | "54.231.0.0/17", 135 | "54.231.128.0/19", 136 | "54.231.160.0/19", 137 | "54.231.192.0/20", 138 | "54.231.224.0/21", 139 | "54.231.232.0/21", 140 | "54.231.240.0/22", 141 | "54.231.244.0/22", 142 | "54.231.252.0/24", 143 | "54.231.253.0/24", 144 | "54.231.254.0/24", 145 | "54.232.0.0/16", 146 | "54.233.0.0/18", 147 | "54.233.64.0/18", 148 | "54.233.128.0/17", 149 | "54.234.0.0/15", 150 | "54.236.0.0/15", 151 | "54.238.0.0/16", 152 | "54.239.2.0/23", 153 | "54.239.4.0/22", 154 | "54.239.8.0/21", 155 | "54.239.16.0/20", 156 | "54.239.32.0/21", 157 | "54.239.48.0/22", 158 | "54.239.52.0/23", 159 | "54.239.54.0/23", 160 | "54.239.56.0/21", 161 | "54.239.96.0/24", 162 | "54.239.98.0/24", 163 | "54.239.99.0/24", 164 | "54.239.100.0/23", 165 | "54.239.104.0/23", 166 | "54.239.108.0/22", 167 | "54.239.114.0/24", 168 | "54.239.128.0/18", 169 | "54.239.192.0/19", 170 | "54.240.128.0/18", 171 | "54.240.192.0/22", 172 | "54.240.196.0/24", 173 | "54.240.197.0/24", 174 | "54.240.198.0/24", 175 | "54.240.199.0/24", 176 | "54.240.200.0/24", 177 | "54.240.202.0/24", 178 | "54.240.203.0/24", 179 | "54.240.204.0/22", 180 | "54.240.216.0/22", 181 | "54.240.220.0/22", 182 | "54.240.225.0/24", 183 | "54.240.226.0/24", 184 | "54.240.227.0/24", 185 | "54.240.230.0/23", 186 | "54.240.232.0/22", 187 | "54.240.236.0/22", 188 | "54.240.240.0/24", 189 | "54.240.244.0/22", 190 | "54.240.248.0/21", 191 | "54.241.0.0/16", 192 | "54.242.0.0/15", 193 | "54.244.0.0/16", 194 | "54.245.0.0/16", 195 | "54.246.0.0/16", 196 | "54.247.0.0/16", 197 | "54.248.0.0/15", 198 | "54.250.0.0/16", 199 | "54.251.0.0/16", 200 | "54.252.0.0/16", 201 | "54.253.0.0/16", 202 | "54.254.0.0/16", 203 | "54.255.0.0/16", 204 | "67.202.0.0/18", 205 | "72.21.192.0/19", 206 | "72.44.32.0/19", 207 | "75.101.128.0/17", 208 | "79.125.0.0/17", 209 | "87.238.80.0/21", 210 | "96.127.0.0/17", 211 | "103.4.8.0/21", 212 | "103.246.148.0/23", 213 | "103.246.150.0/23", 214 | "107.20.0.0/14", 215 | "122.248.192.0/18", 216 | "174.129.0.0/16", 217 | "175.41.128.0/18", 218 | "175.41.192.0/18", 219 | "176.32.64.0/19", 220 | "176.32.96.0/21", 221 | "176.32.104.0/21", 222 | "176.32.112.0/21", 223 | "176.32.120.0/22", 224 | "176.32.125.0/25", 225 | "176.34.0.0/19", 226 | "176.34.32.0/19", 227 | "176.34.64.0/18", 228 | "176.34.128.0/17", 229 | "177.71.128.0/17", 230 | "177.72.240.0/21", 231 | "178.236.0.0/20", 232 | "184.72.0.0/18", 233 | "184.72.64.0/18", 234 | "184.72.128.0/17", 235 | "184.73.0.0/16", 236 | "184.169.128.0/17", 237 | "185.48.120.0/22", 238 | "203.83.220.0/22", 239 | "204.236.128.0/18", 240 | "204.236.192.0/18", 241 | "204.246.160.0/22", 242 | "204.246.164.0/22", 243 | "204.246.168.0/22", 244 | "204.246.174.0/23", 245 | "204.246.176.0/20", 246 | "205.251.192.0/19", 247 | "205.251.224.0/22", 248 | "205.251.228.0/22", 249 | "205.251.232.0/22", 250 | "205.251.236.0/22", 251 | "205.251.240.0/22", 252 | "205.251.244.0/23", 253 | "205.251.247.0/24", 254 | "205.251.248.0/24", 255 | "205.251.249.0/24", 256 | "205.251.250.0/23", 257 | "205.251.252.0/23", 258 | "205.251.254.0/24", 259 | "205.251.255.0/24", 260 | "207.171.160.0/20", 261 | "207.171.176.0/20", 262 | "216.137.32.0/19", 263 | "216.182.224.0/20" 264 | ] -------------------------------------------------------------------------------- /data/ip-ranges/cloudflare.json: -------------------------------------------------------------------------------- 1 | [ 2 | "103.21.244.0/22", 3 | "103.22.200.0/22", 4 | "103.31.4.0/22", 5 | "104.16.0.0/12", 6 | "108.162.192.0/18", 7 | "141.101.64.0/18", 8 | "162.158.0.0/15", 9 | "172.64.0.0/13", 10 | "173.245.48.0/20", 11 | "188.114.96.0/20", 12 | "190.93.240.0/20", 13 | "197.234.240.0/22", 14 | "198.41.128.0/17", 15 | "199.27.128.0/21" 16 | ] -------------------------------------------------------------------------------- /data/ip-ranges/domains.json: -------------------------------------------------------------------------------- 1 | [ 2 | "68.232.44.121", 3 | "91.121.49.42", 4 | "87.98.253.214", 5 | "50.112.255.195", 6 | "54.186.104.15", 7 | "104.131.25.42", 8 | "23.235.37.134", 9 | "117.18.237.29", 10 | "117.18.237.29", 11 | "204.93.150.151", 12 | "173.255.227.96", 13 | "204.79.197.217", 14 | "107.22.12.221", 15 | "54.236.117.198" 16 | ] -------------------------------------------------------------------------------- /data/ip-ranges/dropbox.json: -------------------------------------------------------------------------------- 1 | [ 2 | "45.58.64.0/20", 3 | "108.160.160.0/20", 4 | "185.45.9.0/24", 5 | "185.45.10.0/23", 6 | "199.47.216.0/22" 7 | ] -------------------------------------------------------------------------------- /data/ip-ranges/edgecast.json: -------------------------------------------------------------------------------- 1 | [ 2 | "5.104.64.0/21", 3 | "8.3.30.0/24", 4 | "8.5.249.0/24", 5 | "8.5.250.0/24", 6 | "8.6.96.0/24", 7 | "8.8.64.0/24", 8 | "8.15.15.0/24", 9 | "12.202.248.0/24", 10 | "23.249.49.0/24", 11 | "23.249.55.0/24", 12 | "42.99.160.0/23", 13 | "42.99.162.0/24", 14 | "46.22.64.0/20", 15 | "61.213.191.8/30", 16 | "63.210.131.0/24", 17 | "68.232.32.0/20", 18 | "72.21.80.0/20", 19 | "93.184.208.0/20", 20 | "108.161.240.0/20", 21 | "110.232.176.0/22", 22 | "117.18.232.0/21", 23 | "117.103.183.0/24", 24 | "121.156.59.224/27", 25 | "152.195.0.0/16", 26 | "166.90.81.0/24", 27 | "192.16.0.0/18", 28 | "192.30.0.0/19", 29 | "192.229.128.0/17", 30 | "198.7.16.0/20", 31 | "199.204.24.0/22" 32 | ] -------------------------------------------------------------------------------- /data/ip-ranges/facebook.json: -------------------------------------------------------------------------------- 1 | [ 2 | "31.13.24.0/21", 3 | "31.13.64.0/18", 4 | "45.64.40.0/22", 5 | "66.220.144.0/20", 6 | "69.63.176.0/20", 7 | "69.171.224.0/19", 8 | "74.119.76.0/22", 9 | "103.4.96.0/22", 10 | "129.134.0.0/16", 11 | "157.240.0.0/16", 12 | "173.252.64.0/18", 13 | "179.60.192.0/22", 14 | "185.60.216.0/22", 15 | "199.201.64.0/22", 16 | "204.15.20.0/22" 17 | ] -------------------------------------------------------------------------------- /data/ip-ranges/fastly.json: -------------------------------------------------------------------------------- 1 | [ 2 | "23.235.32.0/20", 3 | "43.249.72.0/22", 4 | "103.244.50.0/24", 5 | "103.245.222.0/23", 6 | "103.245.224.0/24", 7 | "104.156.80.0/20", 8 | "157.52.64.0/18", 9 | "172.111.64.0/18", 10 | "185.31.16.0/22", 11 | "199.27.72.0/21" 12 | ] -------------------------------------------------------------------------------- /data/ip-ranges/github.json: -------------------------------------------------------------------------------- 1 | [ 2 | "192.30.252.0/22" 3 | ] -------------------------------------------------------------------------------- /data/ip-ranges/google.json: -------------------------------------------------------------------------------- 1 | [ 2 | "1.0.0.0/24", 3 | "1.1.1.0/24", 4 | "1.2.3.0/24", 5 | "8.6.48.0/21", 6 | "8.8.4.0/24", 7 | "8.8.8.0/24", 8 | "8.15.202.0/24", 9 | "8.34.208.0/20", 10 | "8.35.192.0/20", 11 | "12.216.80.0/24", 12 | "23.236.48.0/20", 13 | "23.251.128.0/19", 14 | "45.121.228.0/22", 15 | "46.28.246.0/23", 16 | "64.9.224.0/19", 17 | "64.15.112.0/20", 18 | "64.233.160.0/19", 19 | "66.102.0.0/20", 20 | "66.249.64.0/19", 21 | "70.32.128.0/19", 22 | "72.14.192.0/18", 23 | "74.125.0.0/16", 24 | "89.207.224.0/21", 25 | "103.62.64.0/22", 26 | "104.132.0.0/14", 27 | "104.154.0.0/15", 28 | "104.196.0.0/14", 29 | "104.237.161.0/24", 30 | "104.237.162.0/23", 31 | "104.237.164.0/23", 32 | "104.237.174.0/24", 33 | "104.237.188.0/23", 34 | "104.237.191.0/24", 35 | "107.167.160.0/19", 36 | "107.178.192.0/18", 37 | "108.59.80.0/20", 38 | "108.170.192.0/18", 39 | "108.177.0.0/17", 40 | "113.197.104.0/22", 41 | "130.211.0.0/16", 42 | "142.250.0.0/15", 43 | "146.148.0.0/17", 44 | "162.216.148.0/22", 45 | "162.222.176.0/21", 46 | "165.193.245.0/24", 47 | "172.102.8.0/21", 48 | "172.110.32.0/21", 49 | "172.217.0.0/16", 50 | "172.253.0.0/16", 51 | "173.194.0.0/16", 52 | "173.255.112.0/20", 53 | "185.25.28.0/22", 54 | "192.104.160.0/23", 55 | "192.158.28.0/22", 56 | "192.178.0.0/15", 57 | "193.33.4.0/23", 58 | "193.142.125.0/24", 59 | "193.200.222.0/24", 60 | "194.110.194.0/24", 61 | "194.122.80.0/22", 62 | "199.192.112.0/22", 63 | "199.223.232.0/21", 64 | "207.223.160.0/20", 65 | "207.251.96.0/24", 66 | "208.65.152.0/22", 67 | "208.117.224.0/19", 68 | "209.85.128.0/17", 69 | "216.58.192.0/19", 70 | "216.239.32.0/19", 71 | "216.252.220.0/22" 72 | ] -------------------------------------------------------------------------------- /data/ip-ranges/mindspark.json: -------------------------------------------------------------------------------- 1 | [ 2 | "66.235.119.0/24", 3 | "74.113.232.0/21", 4 | "192.198.184.0/21", 5 | "199.36.100.0/22" 6 | ] -------------------------------------------------------------------------------- /data/ip-ranges/twitter.json: -------------------------------------------------------------------------------- 1 | [ 2 | "8.25.194.0/23", 3 | "8.25.196.0/23", 4 | "69.12.56.0/21", 5 | "103.252.112.0/22", 6 | "104.244.40.0/21", 7 | "185.45.4.0/22", 8 | "192.44.68.0/23", 9 | "192.48.236.0/23", 10 | "192.133.76.0/22", 11 | "199.16.156.0/22", 12 | "199.59.148.0/22", 13 | "199.96.56.0/21" 14 | ] -------------------------------------------------------------------------------- /data/ip-ranges/wikimedia.json: -------------------------------------------------------------------------------- 1 | [ 2 | "198.35.26.0/23", 3 | "208.80.152.0/22" 4 | ] -------------------------------------------------------------------------------- /data/router_os/rules.txt: -------------------------------------------------------------------------------- 1 | /ip route remove [/ip route find gateway=pptp-out1 comment=gfw-butter] 2 | /ip route add dst-address=1.0.0.0/24 gateway=pptp-out1 comment=gfw-butter 3 | /ip route add dst-address=1.1.1.0/24 gateway=pptp-out1 comment=gfw-butter 4 | /ip route add dst-address=1.2.3.0/24 gateway=pptp-out1 comment=gfw-butter 5 | /ip route add dst-address=2.16.0.0/13 gateway=pptp-out1 comment=gfw-butter 6 | /ip route add dst-address=4.77.205.0/24 gateway=pptp-out1 comment=gfw-butter 7 | /ip route add dst-address=5.104.64.0/21 gateway=pptp-out1 comment=gfw-butter 8 | /ip route add dst-address=8.3.30.0/24 gateway=pptp-out1 comment=gfw-butter 9 | /ip route add dst-address=8.5.249.0/24 gateway=pptp-out1 comment=gfw-butter 10 | /ip route add dst-address=8.5.250.0/24 gateway=pptp-out1 comment=gfw-butter 11 | /ip route add dst-address=8.6.48.0/21 gateway=pptp-out1 comment=gfw-butter 12 | /ip route add dst-address=8.6.96.0/24 gateway=pptp-out1 comment=gfw-butter 13 | /ip route add dst-address=8.8.4.0/24 gateway=pptp-out1 comment=gfw-butter 14 | /ip route add dst-address=8.8.8.0/24 gateway=pptp-out1 comment=gfw-butter 15 | /ip route add dst-address=8.8.64.0/24 gateway=pptp-out1 comment=gfw-butter 16 | /ip route add dst-address=8.15.15.0/24 gateway=pptp-out1 comment=gfw-butter 17 | /ip route add dst-address=8.15.202.0/24 gateway=pptp-out1 comment=gfw-butter 18 | /ip route add dst-address=8.25.194.0/23 gateway=pptp-out1 comment=gfw-butter 19 | /ip route add dst-address=8.25.196.0/23 gateway=pptp-out1 comment=gfw-butter 20 | /ip route add dst-address=8.34.208.0/20 gateway=pptp-out1 comment=gfw-butter 21 | /ip route add dst-address=8.35.192.0/20 gateway=pptp-out1 comment=gfw-butter 22 | /ip route add dst-address=12.202.248.0/24 gateway=pptp-out1 comment=gfw-butter 23 | /ip route add dst-address=12.216.80.0/24 gateway=pptp-out1 comment=gfw-butter 24 | /ip route add dst-address=23.0.0.0/12 gateway=pptp-out1 comment=gfw-butter 25 | /ip route add dst-address=23.20.0.0/14 gateway=pptp-out1 comment=gfw-butter 26 | /ip route add dst-address=23.32.0.0/11 gateway=pptp-out1 comment=gfw-butter 27 | /ip route add dst-address=23.64.0.0/14 gateway=pptp-out1 comment=gfw-butter 28 | /ip route add dst-address=23.72.0.0/13 gateway=pptp-out1 comment=gfw-butter 29 | /ip route add dst-address=23.192.0.0/11 gateway=pptp-out1 comment=gfw-butter 30 | /ip route add dst-address=23.235.32.0/20 gateway=pptp-out1 comment=gfw-butter 31 | /ip route add dst-address=23.236.48.0/20 gateway=pptp-out1 comment=gfw-butter 32 | /ip route add dst-address=23.249.49.0/24 gateway=pptp-out1 comment=gfw-butter 33 | /ip route add dst-address=23.249.55.0/24 gateway=pptp-out1 comment=gfw-butter 34 | /ip route add dst-address=23.251.128.0/19 gateway=pptp-out1 comment=gfw-butter 35 | /ip route add dst-address=27.0.0.0/22 gateway=pptp-out1 comment=gfw-butter 36 | /ip route add dst-address=27.116.32.0/23 gateway=pptp-out1 comment=gfw-butter 37 | /ip route add dst-address=31.13.24.0/21 gateway=pptp-out1 comment=gfw-butter 38 | /ip route add dst-address=31.13.64.0/18 gateway=pptp-out1 comment=gfw-butter 39 | /ip route add dst-address=38.113.220.0/24 gateway=pptp-out1 comment=gfw-butter 40 | /ip route add dst-address=41.193.163.0/24 gateway=pptp-out1 comment=gfw-butter 41 | /ip route add dst-address=42.99.160.0/23 gateway=pptp-out1 comment=gfw-butter 42 | /ip route add dst-address=42.99.162.0/24 gateway=pptp-out1 comment=gfw-butter 43 | /ip route add dst-address=43.249.72.0/22 gateway=pptp-out1 comment=gfw-butter 44 | /ip route add dst-address=43.250.192.0/23 gateway=pptp-out1 comment=gfw-butter 45 | /ip route add dst-address=43.254.120.0/22 gateway=pptp-out1 comment=gfw-butter 46 | /ip route add dst-address=45.58.64.0/20 gateway=pptp-out1 comment=gfw-butter 47 | /ip route add dst-address=45.64.40.0/22 gateway=pptp-out1 comment=gfw-butter 48 | /ip route add dst-address=45.121.228.0/22 gateway=pptp-out1 comment=gfw-butter 49 | /ip route add dst-address=46.22.64.0/20 gateway=pptp-out1 comment=gfw-butter 50 | /ip route add dst-address=46.28.246.0/23 gateway=pptp-out1 comment=gfw-butter 51 | /ip route add dst-address=46.51.128.0/18 gateway=pptp-out1 comment=gfw-butter 52 | /ip route add dst-address=46.51.192.0/20 gateway=pptp-out1 comment=gfw-butter 53 | /ip route add dst-address=46.51.216.0/21 gateway=pptp-out1 comment=gfw-butter 54 | /ip route add dst-address=46.51.224.0/19 gateway=pptp-out1 comment=gfw-butter 55 | /ip route add dst-address=46.137.0.0/16 gateway=pptp-out1 comment=gfw-butter 56 | /ip route add dst-address=50.16.0.0/14 gateway=pptp-out1 comment=gfw-butter 57 | /ip route add dst-address=50.112.0.0/16 gateway=pptp-out1 comment=gfw-butter 58 | /ip route add dst-address=52.0.0.0/13 gateway=pptp-out1 comment=gfw-butter 59 | /ip route add dst-address=52.8.0.0/16 gateway=pptp-out1 comment=gfw-butter 60 | /ip route add dst-address=52.10.0.0/15 gateway=pptp-out1 comment=gfw-butter 61 | /ip route add dst-address=52.12.0.0/15 gateway=pptp-out1 comment=gfw-butter 62 | /ip route add dst-address=52.16.0.0/13 gateway=pptp-out1 comment=gfw-butter 63 | /ip route add dst-address=52.24.0.0/14 gateway=pptp-out1 comment=gfw-butter 64 | /ip route add dst-address=52.28.0.0/15 gateway=pptp-out1 comment=gfw-butter 65 | /ip route add dst-address=52.64.0.0/16 gateway=pptp-out1 comment=gfw-butter 66 | /ip route add dst-address=52.68.0.0/14 gateway=pptp-out1 comment=gfw-butter 67 | /ip route add dst-address=52.72.0.0/15 gateway=pptp-out1 comment=gfw-butter 68 | /ip route add dst-address=52.74.0.0/16 gateway=pptp-out1 comment=gfw-butter 69 | /ip route add dst-address=52.76.0.0/17 gateway=pptp-out1 comment=gfw-butter 70 | /ip route add dst-address=52.86.0.0/15 gateway=pptp-out1 comment=gfw-butter 71 | /ip route add dst-address=52.88.0.0/14 gateway=pptp-out1 comment=gfw-butter 72 | /ip route add dst-address=52.95.34.0/23 gateway=pptp-out1 comment=gfw-butter 73 | /ip route add dst-address=52.95.36.0/22 gateway=pptp-out1 comment=gfw-butter 74 | /ip route add dst-address=52.95.48.0/21 gateway=pptp-out1 comment=gfw-butter 75 | /ip route add dst-address=52.95.56.0/22 gateway=pptp-out1 comment=gfw-butter 76 | /ip route add dst-address=52.95.240.0/21 gateway=pptp-out1 comment=gfw-butter 77 | /ip route add dst-address=52.95.248.0/24 gateway=pptp-out1 comment=gfw-butter 78 | /ip route add dst-address=52.95.255.0/25 gateway=pptp-out1 comment=gfw-butter 79 | /ip route add dst-address=52.95.255.128/28 gateway=pptp-out1 comment=gfw-butter 80 | /ip route add dst-address=54.64.0.0/11 gateway=pptp-out1 comment=gfw-butter 81 | /ip route add dst-address=54.144.0.0/12 gateway=pptp-out1 comment=gfw-butter 82 | /ip route add dst-address=54.160.0.0/12 gateway=pptp-out1 comment=gfw-butter 83 | /ip route add dst-address=54.176.0.0/14 gateway=pptp-out1 comment=gfw-butter 84 | /ip route add dst-address=54.182.0.0/15 gateway=pptp-out1 comment=gfw-butter 85 | /ip route add dst-address=54.184.0.0/13 gateway=pptp-out1 comment=gfw-butter 86 | /ip route add dst-address=54.192.0.0/12 gateway=pptp-out1 comment=gfw-butter 87 | /ip route add dst-address=54.208.0.0/13 gateway=pptp-out1 comment=gfw-butter 88 | /ip route add dst-address=54.216.0.0/14 gateway=pptp-out1 comment=gfw-butter 89 | /ip route add dst-address=54.220.0.0/15 gateway=pptp-out1 comment=gfw-butter 90 | /ip route add dst-address=54.224.0.0/14 gateway=pptp-out1 comment=gfw-butter 91 | /ip route add dst-address=54.228.0.0/15 gateway=pptp-out1 comment=gfw-butter 92 | /ip route add dst-address=54.230.0.0/16 gateway=pptp-out1 comment=gfw-butter 93 | /ip route add dst-address=54.231.0.0/17 gateway=pptp-out1 comment=gfw-butter 94 | /ip route add dst-address=54.231.128.0/18 gateway=pptp-out1 comment=gfw-butter 95 | /ip route add dst-address=54.231.192.0/20 gateway=pptp-out1 comment=gfw-butter 96 | /ip route add dst-address=54.231.224.0/20 gateway=pptp-out1 comment=gfw-butter 97 | /ip route add dst-address=54.231.240.0/21 gateway=pptp-out1 comment=gfw-butter 98 | /ip route add dst-address=54.231.252.0/23 gateway=pptp-out1 comment=gfw-butter 99 | /ip route add dst-address=54.231.254.0/24 gateway=pptp-out1 comment=gfw-butter 100 | /ip route add dst-address=54.232.0.0/14 gateway=pptp-out1 comment=gfw-butter 101 | /ip route add dst-address=54.236.0.0/15 gateway=pptp-out1 comment=gfw-butter 102 | /ip route add dst-address=54.238.0.0/16 gateway=pptp-out1 comment=gfw-butter 103 | /ip route add dst-address=54.239.2.0/23 gateway=pptp-out1 comment=gfw-butter 104 | /ip route add dst-address=54.239.4.0/22 gateway=pptp-out1 comment=gfw-butter 105 | /ip route add dst-address=54.239.8.0/21 gateway=pptp-out1 comment=gfw-butter 106 | /ip route add dst-address=54.239.16.0/20 gateway=pptp-out1 comment=gfw-butter 107 | /ip route add dst-address=54.239.32.0/21 gateway=pptp-out1 comment=gfw-butter 108 | /ip route add dst-address=54.239.48.0/20 gateway=pptp-out1 comment=gfw-butter 109 | /ip route add dst-address=54.239.96.0/24 gateway=pptp-out1 comment=gfw-butter 110 | /ip route add dst-address=54.239.98.0/23 gateway=pptp-out1 comment=gfw-butter 111 | /ip route add dst-address=54.239.100.0/23 gateway=pptp-out1 comment=gfw-butter 112 | /ip route add dst-address=54.239.104.0/23 gateway=pptp-out1 comment=gfw-butter 113 | /ip route add dst-address=54.239.108.0/22 gateway=pptp-out1 comment=gfw-butter 114 | /ip route add dst-address=54.239.114.0/24 gateway=pptp-out1 comment=gfw-butter 115 | /ip route add dst-address=54.239.128.0/18 gateway=pptp-out1 comment=gfw-butter 116 | /ip route add dst-address=54.239.192.0/19 gateway=pptp-out1 comment=gfw-butter 117 | /ip route add dst-address=54.240.128.0/18 gateway=pptp-out1 comment=gfw-butter 118 | /ip route add dst-address=54.240.192.0/21 gateway=pptp-out1 comment=gfw-butter 119 | /ip route add dst-address=54.240.200.0/24 gateway=pptp-out1 comment=gfw-butter 120 | /ip route add dst-address=54.240.202.0/23 gateway=pptp-out1 comment=gfw-butter 121 | /ip route add dst-address=54.240.204.0/22 gateway=pptp-out1 comment=gfw-butter 122 | /ip route add dst-address=54.240.216.0/21 gateway=pptp-out1 comment=gfw-butter 123 | /ip route add dst-address=54.240.225.0/24 gateway=pptp-out1 comment=gfw-butter 124 | /ip route add dst-address=54.240.226.0/23 gateway=pptp-out1 comment=gfw-butter 125 | /ip route add dst-address=54.240.230.0/23 gateway=pptp-out1 comment=gfw-butter 126 | /ip route add dst-address=54.240.232.0/21 gateway=pptp-out1 comment=gfw-butter 127 | /ip route add dst-address=54.240.240.0/24 gateway=pptp-out1 comment=gfw-butter 128 | /ip route add dst-address=54.240.244.0/22 gateway=pptp-out1 comment=gfw-butter 129 | /ip route add dst-address=54.240.248.0/21 gateway=pptp-out1 comment=gfw-butter 130 | /ip route add dst-address=54.241.0.0/16 gateway=pptp-out1 comment=gfw-butter 131 | /ip route add dst-address=54.242.0.0/15 gateway=pptp-out1 comment=gfw-butter 132 | /ip route add dst-address=54.244.0.0/14 gateway=pptp-out1 comment=gfw-butter 133 | /ip route add dst-address=54.248.0.0/13 gateway=pptp-out1 comment=gfw-butter 134 | /ip route add dst-address=59.151.128.0/18 gateway=pptp-out1 comment=gfw-butter 135 | /ip route add dst-address=60.254.128.0/18 gateway=pptp-out1 comment=gfw-butter 136 | /ip route add dst-address=61.213.191.8/30 gateway=pptp-out1 comment=gfw-butter 137 | /ip route add dst-address=63.84.59.0/24 gateway=pptp-out1 comment=gfw-butter 138 | /ip route add dst-address=63.85.36.0/24 gateway=pptp-out1 comment=gfw-butter 139 | /ip route add dst-address=63.116.109.0/24 gateway=pptp-out1 comment=gfw-butter 140 | /ip route add dst-address=63.119.76.0/24 gateway=pptp-out1 comment=gfw-butter 141 | /ip route add dst-address=63.126.84.0/24 gateway=pptp-out1 comment=gfw-butter 142 | /ip route add dst-address=63.141.194.0/25 gateway=pptp-out1 comment=gfw-butter 143 | /ip route add dst-address=63.141.196.128/25 gateway=pptp-out1 comment=gfw-butter 144 | /ip route add dst-address=63.146.70.0/24 gateway=pptp-out1 comment=gfw-butter 145 | /ip route add dst-address=63.150.12.0/24 gateway=pptp-out1 comment=gfw-butter 146 | /ip route add dst-address=63.208.195.0/24 gateway=pptp-out1 comment=gfw-butter 147 | /ip route add dst-address=63.210.101.0/24 gateway=pptp-out1 comment=gfw-butter 148 | /ip route add dst-address=63.210.131.0/24 gateway=pptp-out1 comment=gfw-butter 149 | /ip route add dst-address=63.210.173.0/24 gateway=pptp-out1 comment=gfw-butter 150 | /ip route add dst-address=63.215.198.96/32 gateway=pptp-out1 comment=gfw-butter 151 | /ip route add dst-address=63.217.8.0/24 gateway=pptp-out1 comment=gfw-butter 152 | /ip route add dst-address=63.217.232.0/24 gateway=pptp-out1 comment=gfw-butter 153 | /ip route add dst-address=63.233.60.0/23 gateway=pptp-out1 comment=gfw-butter 154 | /ip route add dst-address=64.9.224.0/19 gateway=pptp-out1 comment=gfw-butter 155 | /ip route add dst-address=64.15.112.0/20 gateway=pptp-out1 comment=gfw-butter 156 | /ip route add dst-address=64.86.132.0/24 gateway=pptp-out1 comment=gfw-butter 157 | /ip route add dst-address=64.124.187.0/24 gateway=pptp-out1 comment=gfw-butter 158 | /ip route add dst-address=64.124.214.0/24 gateway=pptp-out1 comment=gfw-butter 159 | /ip route add dst-address=64.125.118.0/23 gateway=pptp-out1 comment=gfw-butter 160 | /ip route add dst-address=64.152.108.0/24 gateway=pptp-out1 comment=gfw-butter 161 | /ip route add dst-address=64.157.40.192/26 gateway=pptp-out1 comment=gfw-butter 162 | /ip route add dst-address=64.208.48.0/25 gateway=pptp-out1 comment=gfw-butter 163 | /ip route add dst-address=64.208.174.0/24 gateway=pptp-out1 comment=gfw-butter 164 | /ip route add dst-address=64.208.187.0/24 gateway=pptp-out1 comment=gfw-butter 165 | /ip route add dst-address=64.211.58.0/24 gateway=pptp-out1 comment=gfw-butter 166 | /ip route add dst-address=64.212.114.0/23 gateway=pptp-out1 comment=gfw-butter 167 | /ip route add dst-address=64.232.138.0/24 gateway=pptp-out1 comment=gfw-butter 168 | /ip route add dst-address=64.232.206.0/24 gateway=pptp-out1 comment=gfw-butter 169 | /ip route add dst-address=64.233.160.0/19 gateway=pptp-out1 comment=gfw-butter 170 | /ip route add dst-address=65.19.187.0/24 gateway=pptp-out1 comment=gfw-butter 171 | /ip route add dst-address=65.59.160.0/24 gateway=pptp-out1 comment=gfw-butter 172 | /ip route add dst-address=65.202.32.0/22 gateway=pptp-out1 comment=gfw-butter 173 | /ip route add dst-address=66.38.171.0/24 gateway=pptp-out1 comment=gfw-butter 174 | /ip route add dst-address=66.38.185.0/24 gateway=pptp-out1 comment=gfw-butter 175 | /ip route add dst-address=66.102.0.0/20 gateway=pptp-out1 comment=gfw-butter 176 | /ip route add dst-address=66.160.145.0/24 gateway=pptp-out1 comment=gfw-butter 177 | /ip route add dst-address=66.171.231.0/25 gateway=pptp-out1 comment=gfw-butter 178 | /ip route add dst-address=66.198.8.0/24 gateway=pptp-out1 comment=gfw-butter 179 | /ip route add dst-address=66.220.21.0/24 gateway=pptp-out1 comment=gfw-butter 180 | /ip route add dst-address=66.220.144.0/20 gateway=pptp-out1 comment=gfw-butter 181 | /ip route add dst-address=66.235.119.0/24 gateway=pptp-out1 comment=gfw-butter 182 | /ip route add dst-address=66.249.64.0/19 gateway=pptp-out1 comment=gfw-butter 183 | /ip route add dst-address=67.131.232.0/24 gateway=pptp-out1 comment=gfw-butter 184 | /ip route add dst-address=67.202.0.0/18 gateway=pptp-out1 comment=gfw-butter 185 | /ip route add dst-address=68.232.32.0/20 gateway=pptp-out1 comment=gfw-butter 186 | /ip route add dst-address=69.12.56.0/21 gateway=pptp-out1 comment=gfw-butter 187 | /ip route add dst-address=69.26.179.0/24 gateway=pptp-out1 comment=gfw-butter 188 | /ip route add dst-address=69.26.180.0/24 gateway=pptp-out1 comment=gfw-butter 189 | /ip route add dst-address=69.27.160.0/20 gateway=pptp-out1 comment=gfw-butter 190 | /ip route add dst-address=69.31.20.0/24 gateway=pptp-out1 comment=gfw-butter 191 | /ip route add dst-address=69.31.21.0/25 gateway=pptp-out1 comment=gfw-butter 192 | /ip route add dst-address=69.31.106.0/23 gateway=pptp-out1 comment=gfw-butter 193 | /ip route add dst-address=69.31.119.128/25 gateway=pptp-out1 comment=gfw-butter 194 | /ip route add dst-address=69.45.79.0/24 gateway=pptp-out1 comment=gfw-butter 195 | /ip route add dst-address=69.45.84.0/23 gateway=pptp-out1 comment=gfw-butter 196 | /ip route add dst-address=69.45.86.0/24 gateway=pptp-out1 comment=gfw-butter 197 | /ip route add dst-address=69.63.176.0/20 gateway=pptp-out1 comment=gfw-butter 198 | /ip route add dst-address=69.171.224.0/19 gateway=pptp-out1 comment=gfw-butter 199 | /ip route add dst-address=69.192.0.0/16 gateway=pptp-out1 comment=gfw-butter 200 | /ip route add dst-address=70.32.128.0/19 gateway=pptp-out1 comment=gfw-butter 201 | /ip route add dst-address=70.39.139.0/25 gateway=pptp-out1 comment=gfw-butter 202 | /ip route add dst-address=72.14.192.0/18 gateway=pptp-out1 comment=gfw-butter 203 | /ip route add dst-address=72.21.80.0/20 gateway=pptp-out1 comment=gfw-butter 204 | /ip route add dst-address=72.21.192.0/19 gateway=pptp-out1 comment=gfw-butter 205 | /ip route add dst-address=72.44.32.0/19 gateway=pptp-out1 comment=gfw-butter 206 | /ip route add dst-address=72.246.0.0/15 gateway=pptp-out1 comment=gfw-butter 207 | /ip route add dst-address=74.113.232.0/21 gateway=pptp-out1 comment=gfw-butter 208 | /ip route add dst-address=74.119.76.0/22 gateway=pptp-out1 comment=gfw-butter 209 | /ip route add dst-address=74.125.0.0/16 gateway=pptp-out1 comment=gfw-butter 210 | /ip route add dst-address=75.101.128.0/17 gateway=pptp-out1 comment=gfw-butter 211 | /ip route add dst-address=79.125.0.0/17 gateway=pptp-out1 comment=gfw-butter 212 | /ip route add dst-address=80.67.64.0/19 gateway=pptp-out1 comment=gfw-butter 213 | /ip route add dst-address=81.20.72.128/25 gateway=pptp-out1 comment=gfw-butter 214 | /ip route add dst-address=81.25.198.128/25 gateway=pptp-out1 comment=gfw-butter 215 | /ip route add dst-address=81.25.206.128/25 gateway=pptp-out1 comment=gfw-butter 216 | /ip route add dst-address=81.93.191.0/24 gateway=pptp-out1 comment=gfw-butter 217 | /ip route add dst-address=81.93.208.0/26 gateway=pptp-out1 comment=gfw-butter 218 | /ip route add dst-address=82.112.106.0/24 gateway=pptp-out1 comment=gfw-butter 219 | /ip route add dst-address=83.217.226.0/24 gateway=pptp-out1 comment=gfw-butter 220 | /ip route add dst-address=84.24.64.0/20 gateway=pptp-out1 comment=gfw-butter 221 | /ip route add dst-address=84.53.128.0/18 gateway=pptp-out1 comment=gfw-butter 222 | /ip route add dst-address=87.98.253.214/32 gateway=pptp-out1 comment=gfw-butter 223 | /ip route add dst-address=87.238.80.0/21 gateway=pptp-out1 comment=gfw-butter 224 | /ip route add dst-address=88.221.0.0/16 gateway=pptp-out1 comment=gfw-butter 225 | /ip route add dst-address=89.207.224.0/21 gateway=pptp-out1 comment=gfw-butter 226 | /ip route add dst-address=91.121.49.42/32 gateway=pptp-out1 comment=gfw-butter 227 | /ip route add dst-address=92.122.0.0/15 gateway=pptp-out1 comment=gfw-butter 228 | /ip route add dst-address=93.184.208.0/20 gateway=pptp-out1 comment=gfw-butter 229 | /ip route add dst-address=93.191.175.0/24 gateway=pptp-out1 comment=gfw-butter 230 | /ip route add dst-address=95.100.0.0/15 gateway=pptp-out1 comment=gfw-butter 231 | /ip route add dst-address=96.6.0.0/15 gateway=pptp-out1 comment=gfw-butter 232 | /ip route add dst-address=96.16.0.0/15 gateway=pptp-out1 comment=gfw-butter 233 | /ip route add dst-address=96.127.0.0/17 gateway=pptp-out1 comment=gfw-butter 234 | /ip route add dst-address=98.142.96.0/20 gateway=pptp-out1 comment=gfw-butter 235 | /ip route add dst-address=103.4.8.0/21 gateway=pptp-out1 comment=gfw-butter 236 | /ip route add dst-address=103.4.96.0/22 gateway=pptp-out1 comment=gfw-butter 237 | /ip route add dst-address=103.21.244.0/22 gateway=pptp-out1 comment=gfw-butter 238 | /ip route add dst-address=103.22.200.0/22 gateway=pptp-out1 comment=gfw-butter 239 | /ip route add dst-address=103.31.4.0/22 gateway=pptp-out1 comment=gfw-butter 240 | /ip route add dst-address=103.62.64.0/22 gateway=pptp-out1 comment=gfw-butter 241 | /ip route add dst-address=103.238.148.0/22 gateway=pptp-out1 comment=gfw-butter 242 | /ip route add dst-address=103.244.50.0/24 gateway=pptp-out1 comment=gfw-butter 243 | /ip route add dst-address=103.245.222.0/23 gateway=pptp-out1 comment=gfw-butter 244 | /ip route add dst-address=103.245.224.0/24 gateway=pptp-out1 comment=gfw-butter 245 | /ip route add dst-address=103.246.148.0/22 gateway=pptp-out1 comment=gfw-butter 246 | /ip route add dst-address=103.252.112.0/22 gateway=pptp-out1 comment=gfw-butter 247 | /ip route add dst-address=104.16.0.0/12 gateway=pptp-out1 comment=gfw-butter 248 | /ip route add dst-address=104.64.0.0/10 gateway=pptp-out1 comment=gfw-butter 249 | /ip route add dst-address=104.131.25.42/32 gateway=pptp-out1 comment=gfw-butter 250 | /ip route add dst-address=104.132.0.0/14 gateway=pptp-out1 comment=gfw-butter 251 | /ip route add dst-address=104.154.0.0/15 gateway=pptp-out1 comment=gfw-butter 252 | /ip route add dst-address=104.156.80.0/20 gateway=pptp-out1 comment=gfw-butter 253 | /ip route add dst-address=104.196.0.0/14 gateway=pptp-out1 comment=gfw-butter 254 | /ip route add dst-address=104.237.161.0/24 gateway=pptp-out1 comment=gfw-butter 255 | /ip route add dst-address=104.237.162.0/23 gateway=pptp-out1 comment=gfw-butter 256 | /ip route add dst-address=104.237.164.0/23 gateway=pptp-out1 comment=gfw-butter 257 | /ip route add dst-address=104.237.174.0/24 gateway=pptp-out1 comment=gfw-butter 258 | /ip route add dst-address=104.237.188.0/23 gateway=pptp-out1 comment=gfw-butter 259 | /ip route add dst-address=104.237.191.0/24 gateway=pptp-out1 comment=gfw-butter 260 | /ip route add dst-address=104.244.40.0/21 gateway=pptp-out1 comment=gfw-butter 261 | /ip route add dst-address=107.20.0.0/14 gateway=pptp-out1 comment=gfw-butter 262 | /ip route add dst-address=107.167.160.0/19 gateway=pptp-out1 comment=gfw-butter 263 | /ip route add dst-address=107.178.192.0/18 gateway=pptp-out1 comment=gfw-butter 264 | /ip route add dst-address=108.59.80.0/20 gateway=pptp-out1 comment=gfw-butter 265 | /ip route add dst-address=108.160.160.0/20 gateway=pptp-out1 comment=gfw-butter 266 | /ip route add dst-address=108.161.240.0/20 gateway=pptp-out1 comment=gfw-butter 267 | /ip route add dst-address=108.162.192.0/18 gateway=pptp-out1 comment=gfw-butter 268 | /ip route add dst-address=108.170.192.0/18 gateway=pptp-out1 comment=gfw-butter 269 | /ip route add dst-address=108.177.0.0/17 gateway=pptp-out1 comment=gfw-butter 270 | /ip route add dst-address=110.164.15.0/24 gateway=pptp-out1 comment=gfw-butter 271 | /ip route add dst-address=110.232.176.0/22 gateway=pptp-out1 comment=gfw-butter 272 | /ip route add dst-address=113.197.104.0/22 gateway=pptp-out1 comment=gfw-butter 273 | /ip route add dst-address=117.18.232.0/21 gateway=pptp-out1 comment=gfw-butter 274 | /ip route add dst-address=117.103.183.0/24 gateway=pptp-out1 comment=gfw-butter 275 | /ip route add dst-address=118.214.0.0/15 gateway=pptp-out1 comment=gfw-butter 276 | /ip route add dst-address=121.78.191.0/24 gateway=pptp-out1 comment=gfw-butter 277 | /ip route add dst-address=121.156.59.224/27 gateway=pptp-out1 comment=gfw-butter 278 | /ip route add dst-address=122.248.192.0/18 gateway=pptp-out1 comment=gfw-butter 279 | /ip route add dst-address=122.252.32.0/19 gateway=pptp-out1 comment=gfw-butter 280 | /ip route add dst-address=122.252.128.0/20 gateway=pptp-out1 comment=gfw-butter 281 | /ip route add dst-address=124.155.192.0/24 gateway=pptp-out1 comment=gfw-butter 282 | /ip route add dst-address=125.56.128.0/17 gateway=pptp-out1 comment=gfw-butter 283 | /ip route add dst-address=125.252.192.0/18 gateway=pptp-out1 comment=gfw-butter 284 | /ip route add dst-address=128.241.89.0/24 gateway=pptp-out1 comment=gfw-butter 285 | /ip route add dst-address=128.241.91.0/24 gateway=pptp-out1 comment=gfw-butter 286 | /ip route add dst-address=128.241.218.0/24 gateway=pptp-out1 comment=gfw-butter 287 | /ip route add dst-address=128.241.221.0/24 gateway=pptp-out1 comment=gfw-butter 288 | /ip route add dst-address=129.134.0.0/16 gateway=pptp-out1 comment=gfw-butter 289 | /ip route add dst-address=130.211.0.0/16 gateway=pptp-out1 comment=gfw-butter 290 | /ip route add dst-address=141.101.64.0/18 gateway=pptp-out1 comment=gfw-butter 291 | /ip route add dst-address=142.250.0.0/15 gateway=pptp-out1 comment=gfw-butter 292 | /ip route add dst-address=146.82.98.0/24 gateway=pptp-out1 comment=gfw-butter 293 | /ip route add dst-address=146.148.0.0/17 gateway=pptp-out1 comment=gfw-butter 294 | /ip route add dst-address=152.195.0.0/16 gateway=pptp-out1 comment=gfw-butter 295 | /ip route add dst-address=157.52.64.0/18 gateway=pptp-out1 comment=gfw-butter 296 | /ip route add dst-address=157.238.74.0/23 gateway=pptp-out1 comment=gfw-butter 297 | /ip route add dst-address=157.240.0.0/16 gateway=pptp-out1 comment=gfw-butter 298 | /ip route add dst-address=162.158.0.0/15 gateway=pptp-out1 comment=gfw-butter 299 | /ip route add dst-address=162.216.148.0/22 gateway=pptp-out1 comment=gfw-butter 300 | /ip route add dst-address=162.222.176.0/21 gateway=pptp-out1 comment=gfw-butter 301 | /ip route add dst-address=165.193.245.0/24 gateway=pptp-out1 comment=gfw-butter 302 | /ip route add dst-address=165.254.1.0/25 gateway=pptp-out1 comment=gfw-butter 303 | /ip route add dst-address=165.254.27.64/26 gateway=pptp-out1 comment=gfw-butter 304 | /ip route add dst-address=165.254.32.0/23 gateway=pptp-out1 comment=gfw-butter 305 | /ip route add dst-address=165.254.40.0/23 gateway=pptp-out1 comment=gfw-butter 306 | /ip route add dst-address=165.254.52.0/24 gateway=pptp-out1 comment=gfw-butter 307 | /ip route add dst-address=165.254.94.0/23 gateway=pptp-out1 comment=gfw-butter 308 | /ip route add dst-address=165.254.99.0/24 gateway=pptp-out1 comment=gfw-butter 309 | /ip route add dst-address=165.254.127.0/24 gateway=pptp-out1 comment=gfw-butter 310 | /ip route add dst-address=165.254.133.0/24 gateway=pptp-out1 comment=gfw-butter 311 | /ip route add dst-address=165.254.137.64/26 gateway=pptp-out1 comment=gfw-butter 312 | /ip route add dst-address=165.254.156.0/23 gateway=pptp-out1 comment=gfw-butter 313 | /ip route add dst-address=165.254.158.0/25 gateway=pptp-out1 comment=gfw-butter 314 | /ip route add dst-address=165.254.159.128/25 gateway=pptp-out1 comment=gfw-butter 315 | /ip route add dst-address=165.254.202.64/26 gateway=pptp-out1 comment=gfw-butter 316 | /ip route add dst-address=165.254.202.128/26 gateway=pptp-out1 comment=gfw-butter 317 | /ip route add dst-address=165.254.204.0/23 gateway=pptp-out1 comment=gfw-butter 318 | /ip route add dst-address=165.254.245.0/25 gateway=pptp-out1 comment=gfw-butter 319 | /ip route add dst-address=166.90.81.0/24 gateway=pptp-out1 comment=gfw-butter 320 | /ip route add dst-address=166.90.150.0/24 gateway=pptp-out1 comment=gfw-butter 321 | /ip route add dst-address=166.90.208.166/32 gateway=pptp-out1 comment=gfw-butter 322 | /ip route add dst-address=168.143.240.0/22 gateway=pptp-out1 comment=gfw-butter 323 | /ip route add dst-address=168.143.255.0/24 gateway=pptp-out1 comment=gfw-butter 324 | /ip route add dst-address=172.64.0.0/13 gateway=pptp-out1 comment=gfw-butter 325 | /ip route add dst-address=172.102.8.0/21 gateway=pptp-out1 comment=gfw-butter 326 | /ip route add dst-address=172.110.32.0/21 gateway=pptp-out1 comment=gfw-butter 327 | /ip route add dst-address=172.111.64.0/18 gateway=pptp-out1 comment=gfw-butter 328 | /ip route add dst-address=172.217.0.0/16 gateway=pptp-out1 comment=gfw-butter 329 | /ip route add dst-address=172.224.0.0/12 gateway=pptp-out1 comment=gfw-butter 330 | /ip route add dst-address=172.247.176.0/20 gateway=pptp-out1 comment=gfw-butter 331 | /ip route add dst-address=172.253.0.0/16 gateway=pptp-out1 comment=gfw-butter 332 | /ip route add dst-address=173.194.0.0/16 gateway=pptp-out1 comment=gfw-butter 333 | /ip route add dst-address=173.222.0.0/15 gateway=pptp-out1 comment=gfw-butter 334 | /ip route add dst-address=173.245.48.0/20 gateway=pptp-out1 comment=gfw-butter 335 | /ip route add dst-address=173.252.64.0/18 gateway=pptp-out1 comment=gfw-butter 336 | /ip route add dst-address=173.255.112.0/20 gateway=pptp-out1 comment=gfw-butter 337 | /ip route add dst-address=173.255.227.96/32 gateway=pptp-out1 comment=gfw-butter 338 | /ip route add dst-address=174.129.0.0/16 gateway=pptp-out1 comment=gfw-butter 339 | /ip route add dst-address=175.41.128.0/17 gateway=pptp-out1 comment=gfw-butter 340 | /ip route add dst-address=176.32.64.0/19 gateway=pptp-out1 comment=gfw-butter 341 | /ip route add dst-address=176.32.96.0/20 gateway=pptp-out1 comment=gfw-butter 342 | /ip route add dst-address=176.32.112.0/21 gateway=pptp-out1 comment=gfw-butter 343 | /ip route add dst-address=176.32.120.0/22 gateway=pptp-out1 comment=gfw-butter 344 | /ip route add dst-address=176.32.125.0/25 gateway=pptp-out1 comment=gfw-butter 345 | /ip route add dst-address=176.34.0.0/16 gateway=pptp-out1 comment=gfw-butter 346 | /ip route add dst-address=177.71.128.0/17 gateway=pptp-out1 comment=gfw-butter 347 | /ip route add dst-address=177.72.240.0/21 gateway=pptp-out1 comment=gfw-butter 348 | /ip route add dst-address=178.236.0.0/20 gateway=pptp-out1 comment=gfw-butter 349 | /ip route add dst-address=179.60.192.0/22 gateway=pptp-out1 comment=gfw-butter 350 | /ip route add dst-address=182.50.0.0/19 gateway=pptp-out1 comment=gfw-butter 351 | /ip route add dst-address=182.50.32.0/20 gateway=pptp-out1 comment=gfw-butter 352 | /ip route add dst-address=184.24.0.0/13 gateway=pptp-out1 comment=gfw-butter 353 | /ip route add dst-address=184.46.152.0/22 gateway=pptp-out1 comment=gfw-butter 354 | /ip route add dst-address=184.50.0.0/15 gateway=pptp-out1 comment=gfw-butter 355 | /ip route add dst-address=184.72.0.0/15 gateway=pptp-out1 comment=gfw-butter 356 | /ip route add dst-address=184.84.0.0/14 gateway=pptp-out1 comment=gfw-butter 357 | /ip route add dst-address=184.169.128.0/17 gateway=pptp-out1 comment=gfw-butter 358 | /ip route add dst-address=184.214.32.0/20 gateway=pptp-out1 comment=gfw-butter 359 | /ip route add dst-address=185.25.28.0/22 gateway=pptp-out1 comment=gfw-butter 360 | /ip route add dst-address=185.31.16.0/22 gateway=pptp-out1 comment=gfw-butter 361 | /ip route add dst-address=185.45.4.0/22 gateway=pptp-out1 comment=gfw-butter 362 | /ip route add dst-address=185.45.9.0/24 gateway=pptp-out1 comment=gfw-butter 363 | /ip route add dst-address=185.45.10.0/23 gateway=pptp-out1 comment=gfw-butter 364 | /ip route add dst-address=185.48.120.0/22 gateway=pptp-out1 comment=gfw-butter 365 | /ip route add dst-address=185.60.216.0/22 gateway=pptp-out1 comment=gfw-butter 366 | /ip route add dst-address=188.114.96.0/20 gateway=pptp-out1 comment=gfw-butter 367 | /ip route add dst-address=190.2.175.0/24 gateway=pptp-out1 comment=gfw-butter 368 | /ip route add dst-address=190.93.240.0/20 gateway=pptp-out1 comment=gfw-butter 369 | /ip route add dst-address=192.16.0.0/18 gateway=pptp-out1 comment=gfw-butter 370 | /ip route add dst-address=192.30.0.0/19 gateway=pptp-out1 comment=gfw-butter 371 | /ip route add dst-address=192.30.252.0/22 gateway=pptp-out1 comment=gfw-butter 372 | /ip route add dst-address=192.44.68.0/23 gateway=pptp-out1 comment=gfw-butter 373 | /ip route add dst-address=192.48.236.0/23 gateway=pptp-out1 comment=gfw-butter 374 | /ip route add dst-address=192.70.222.0/24 gateway=pptp-out1 comment=gfw-butter 375 | /ip route add dst-address=192.104.160.0/23 gateway=pptp-out1 comment=gfw-butter 376 | /ip route add dst-address=192.133.76.0/22 gateway=pptp-out1 comment=gfw-butter 377 | /ip route add dst-address=192.158.28.0/22 gateway=pptp-out1 comment=gfw-butter 378 | /ip route add dst-address=192.178.0.0/15 gateway=pptp-out1 comment=gfw-butter 379 | /ip route add dst-address=192.198.184.0/21 gateway=pptp-out1 comment=gfw-butter 380 | /ip route add dst-address=192.204.3.0/24 gateway=pptp-out1 comment=gfw-butter 381 | /ip route add dst-address=192.204.4.0/24 gateway=pptp-out1 comment=gfw-butter 382 | /ip route add dst-address=192.229.128.0/17 gateway=pptp-out1 comment=gfw-butter 383 | /ip route add dst-address=193.33.4.0/23 gateway=pptp-out1 comment=gfw-butter 384 | /ip route add dst-address=193.108.88.0/21 gateway=pptp-out1 comment=gfw-butter 385 | /ip route add dst-address=193.108.152.0/22 gateway=pptp-out1 comment=gfw-butter 386 | /ip route add dst-address=193.142.125.0/24 gateway=pptp-out1 comment=gfw-butter 387 | /ip route add dst-address=193.200.222.0/24 gateway=pptp-out1 comment=gfw-butter 388 | /ip route add dst-address=194.110.194.0/24 gateway=pptp-out1 comment=gfw-butter 389 | /ip route add dst-address=194.122.80.0/22 gateway=pptp-out1 comment=gfw-butter 390 | /ip route add dst-address=195.57.81.0/24 gateway=pptp-out1 comment=gfw-butter 391 | /ip route add dst-address=195.57.152.0/23 gateway=pptp-out1 comment=gfw-butter 392 | /ip route add dst-address=195.95.192.0/22 gateway=pptp-out1 comment=gfw-butter 393 | /ip route add dst-address=195.245.124.0/24 gateway=pptp-out1 comment=gfw-butter 394 | /ip route add dst-address=195.245.126.0/23 gateway=pptp-out1 comment=gfw-butter 395 | /ip route add dst-address=197.234.240.0/22 gateway=pptp-out1 comment=gfw-butter 396 | /ip route add dst-address=198.7.16.0/20 gateway=pptp-out1 comment=gfw-butter 397 | /ip route add dst-address=198.35.26.0/23 gateway=pptp-out1 comment=gfw-butter 398 | /ip route add dst-address=198.41.128.0/17 gateway=pptp-out1 comment=gfw-butter 399 | /ip route add dst-address=198.47.108.0/25 gateway=pptp-out1 comment=gfw-butter 400 | /ip route add dst-address=198.87.51.0/24 gateway=pptp-out1 comment=gfw-butter 401 | /ip route add dst-address=198.93.38.0/24 gateway=pptp-out1 comment=gfw-butter 402 | /ip route add dst-address=198.144.112.0/24 gateway=pptp-out1 comment=gfw-butter 403 | /ip route add dst-address=199.16.156.0/22 gateway=pptp-out1 comment=gfw-butter 404 | /ip route add dst-address=199.27.72.0/21 gateway=pptp-out1 comment=gfw-butter 405 | /ip route add dst-address=199.27.128.0/21 gateway=pptp-out1 comment=gfw-butter 406 | /ip route add dst-address=199.36.100.0/22 gateway=pptp-out1 comment=gfw-butter 407 | /ip route add dst-address=199.47.216.0/22 gateway=pptp-out1 comment=gfw-butter 408 | /ip route add dst-address=199.48.106.0/24 gateway=pptp-out1 comment=gfw-butter 409 | /ip route add dst-address=199.59.148.0/22 gateway=pptp-out1 comment=gfw-butter 410 | /ip route add dst-address=199.96.56.0/21 gateway=pptp-out1 comment=gfw-butter 411 | /ip route add dst-address=199.192.112.0/22 gateway=pptp-out1 comment=gfw-butter 412 | /ip route add dst-address=199.201.64.0/22 gateway=pptp-out1 comment=gfw-butter 413 | /ip route add dst-address=199.204.24.0/22 gateway=pptp-out1 comment=gfw-butter 414 | /ip route add dst-address=199.223.232.0/21 gateway=pptp-out1 comment=gfw-butter 415 | /ip route add dst-address=199.239.25.0/24 gateway=pptp-out1 comment=gfw-butter 416 | /ip route add dst-address=200.136.36.0/24 gateway=pptp-out1 comment=gfw-butter 417 | /ip route add dst-address=201.220.10.0/24 gateway=pptp-out1 comment=gfw-butter 418 | /ip route add dst-address=203.25.23.0/24 gateway=pptp-out1 comment=gfw-butter 419 | /ip route add dst-address=203.30.14.0/24 gateway=pptp-out1 comment=gfw-butter 420 | /ip route add dst-address=203.31.242.0/24 gateway=pptp-out1 comment=gfw-butter 421 | /ip route add dst-address=203.63.146.0/24 gateway=pptp-out1 comment=gfw-butter 422 | /ip route add dst-address=203.69.138.0/24 gateway=pptp-out1 comment=gfw-butter 423 | /ip route add dst-address=203.69.141.0/24 gateway=pptp-out1 comment=gfw-butter 424 | /ip route add dst-address=203.83.220.0/22 gateway=pptp-out1 comment=gfw-butter 425 | /ip route add dst-address=203.221.109.0/24 gateway=pptp-out1 comment=gfw-butter 426 | /ip route add dst-address=204.0.54.0/23 gateway=pptp-out1 comment=gfw-butter 427 | /ip route add dst-address=204.2.148.128/25 gateway=pptp-out1 comment=gfw-butter 428 | /ip route add dst-address=204.2.163.64/26 gateway=pptp-out1 comment=gfw-butter 429 | /ip route add dst-address=204.2.187.0/24 gateway=pptp-out1 comment=gfw-butter 430 | /ip route add dst-address=204.2.199.0/24 gateway=pptp-out1 comment=gfw-butter 431 | /ip route add dst-address=204.2.215.0/24 gateway=pptp-out1 comment=gfw-butter 432 | /ip route add dst-address=204.8.48.0/22 gateway=pptp-out1 comment=gfw-butter 433 | /ip route add dst-address=204.10.28.0/22 gateway=pptp-out1 comment=gfw-butter 434 | /ip route add dst-address=204.15.20.0/22 gateway=pptp-out1 comment=gfw-butter 435 | /ip route add dst-address=204.79.197.217/32 gateway=pptp-out1 comment=gfw-butter 436 | /ip route add dst-address=204.93.46.0/23 gateway=pptp-out1 comment=gfw-butter 437 | /ip route add dst-address=204.93.150.151/32 gateway=pptp-out1 comment=gfw-butter 438 | /ip route add dst-address=204.236.128.0/17 gateway=pptp-out1 comment=gfw-butter 439 | /ip route add dst-address=204.245.23.0/24 gateway=pptp-out1 comment=gfw-butter 440 | /ip route add dst-address=204.245.143.0/25 gateway=pptp-out1 comment=gfw-butter 441 | /ip route add dst-address=204.245.152.64/26 gateway=pptp-out1 comment=gfw-butter 442 | /ip route add dst-address=204.245.190.0/25 gateway=pptp-out1 comment=gfw-butter 443 | /ip route add dst-address=204.246.160.0/21 gateway=pptp-out1 comment=gfw-butter 444 | /ip route add dst-address=204.246.168.0/22 gateway=pptp-out1 comment=gfw-butter 445 | /ip route add dst-address=204.246.174.0/23 gateway=pptp-out1 comment=gfw-butter 446 | /ip route add dst-address=204.246.176.0/20 gateway=pptp-out1 comment=gfw-butter 447 | /ip route add dst-address=204.246.230.0/24 gateway=pptp-out1 comment=gfw-butter 448 | /ip route add dst-address=205.251.192.0/19 gateway=pptp-out1 comment=gfw-butter 449 | /ip route add dst-address=205.251.224.0/20 gateway=pptp-out1 comment=gfw-butter 450 | /ip route add dst-address=205.251.240.0/22 gateway=pptp-out1 comment=gfw-butter 451 | /ip route add dst-address=205.251.244.0/23 gateway=pptp-out1 comment=gfw-butter 452 | /ip route add dst-address=205.251.247.0/24 gateway=pptp-out1 comment=gfw-butter 453 | /ip route add dst-address=205.251.248.0/21 gateway=pptp-out1 comment=gfw-butter 454 | /ip route add dst-address=206.55.4.128/25 gateway=pptp-out1 comment=gfw-butter 455 | /ip route add dst-address=206.57.28.0/24 gateway=pptp-out1 comment=gfw-butter 456 | /ip route add dst-address=206.132.122.0/24 gateway=pptp-out1 comment=gfw-butter 457 | /ip route add dst-address=206.161.222.0/23 gateway=pptp-out1 comment=gfw-butter 458 | /ip route add dst-address=206.239.100.0/23 gateway=pptp-out1 comment=gfw-butter 459 | /ip route add dst-address=207.126.107.0/24 gateway=pptp-out1 comment=gfw-butter 460 | /ip route add dst-address=207.151.118.128/25 gateway=pptp-out1 comment=gfw-butter 461 | /ip route add dst-address=207.171.160.0/19 gateway=pptp-out1 comment=gfw-butter 462 | /ip route add dst-address=207.223.160.0/20 gateway=pptp-out1 comment=gfw-butter 463 | /ip route add dst-address=207.251.96.0/24 gateway=pptp-out1 comment=gfw-butter 464 | /ip route add dst-address=208.48.0.0/24 gateway=pptp-out1 comment=gfw-butter 465 | /ip route add dst-address=208.50.100.0/24 gateway=pptp-out1 comment=gfw-butter 466 | /ip route add dst-address=208.65.152.0/22 gateway=pptp-out1 comment=gfw-butter 467 | /ip route add dst-address=208.80.152.0/22 gateway=pptp-out1 comment=gfw-butter 468 | /ip route add dst-address=208.117.224.0/19 gateway=pptp-out1 comment=gfw-butter 469 | /ip route add dst-address=209.85.128.0/17 gateway=pptp-out1 comment=gfw-butter 470 | /ip route add dst-address=209.200.128.0/23 gateway=pptp-out1 comment=gfw-butter 471 | /ip route add dst-address=209.200.130.0/24 gateway=pptp-out1 comment=gfw-butter 472 | /ip route add dst-address=209.249.114.0/23 gateway=pptp-out1 comment=gfw-butter 473 | /ip route add dst-address=210.8.28.0/23 gateway=pptp-out1 comment=gfw-butter 474 | /ip route add dst-address=210.9.71.0/24 gateway=pptp-out1 comment=gfw-butter 475 | /ip route add dst-address=210.9.135.192/26 gateway=pptp-out1 comment=gfw-butter 476 | /ip route add dst-address=210.11.208.0/22 gateway=pptp-out1 comment=gfw-butter 477 | /ip route add dst-address=210.11.212.0/23 gateway=pptp-out1 comment=gfw-butter 478 | /ip route add dst-address=210.61.248.0/23 gateway=pptp-out1 comment=gfw-butter 479 | /ip route add dst-address=211.175.153.0/24 gateway=pptp-out1 comment=gfw-butter 480 | /ip route add dst-address=212.119.27.0/25 gateway=pptp-out1 comment=gfw-butter 481 | /ip route add dst-address=213.198.95.128/25 gateway=pptp-out1 comment=gfw-butter 482 | /ip route add dst-address=213.198.96.0/24 gateway=pptp-out1 comment=gfw-butter 483 | /ip route add dst-address=216.58.192.0/19 gateway=pptp-out1 comment=gfw-butter 484 | /ip route add dst-address=216.137.32.0/19 gateway=pptp-out1 comment=gfw-butter 485 | /ip route add dst-address=216.156.213.0/24 gateway=pptp-out1 comment=gfw-butter 486 | /ip route add dst-address=216.156.242.0/24 gateway=pptp-out1 comment=gfw-butter 487 | /ip route add dst-address=216.182.224.0/20 gateway=pptp-out1 comment=gfw-butter 488 | /ip route add dst-address=216.187.88.0/23 gateway=pptp-out1 comment=gfw-butter 489 | /ip route add dst-address=216.200.69.0/24 gateway=pptp-out1 comment=gfw-butter 490 | /ip route add dst-address=216.206.12.128/26 gateway=pptp-out1 comment=gfw-butter 491 | /ip route add dst-address=216.206.30.0/24 gateway=pptp-out1 comment=gfw-butter 492 | /ip route add dst-address=216.216.127.0/24 gateway=pptp-out1 comment=gfw-butter 493 | /ip route add dst-address=216.218.251.0/24 gateway=pptp-out1 comment=gfw-butter 494 | /ip route add dst-address=216.239.32.0/19 gateway=pptp-out1 comment=gfw-butter 495 | /ip route add dst-address=216.252.220.0/22 gateway=pptp-out1 comment=gfw-butter 496 | /ip route add dst-address=219.76.11.0/24 gateway=pptp-out1 comment=gfw-butter 497 | /ip route add dst-address=219.76.14.0/26 gateway=pptp-out1 comment=gfw-butter -------------------------------------------------------------------------------- /lib/addr_merger.rb: -------------------------------------------------------------------------------- 1 | # from https://github.com/noahhaon/cidr-lite-ruby 2 | 3 | class AddrMerger 4 | 5 | def initialize( options = {} ) 6 | @nbits = 40 7 | @masks = (0..@nbits).map{ |i| ("1" * i) + ("0" * (40-i)) }.map{ |m| [m].pack("B*") } 8 | @ranges = Hash.new(0) 9 | end 10 | 11 | def add(cidr) 12 | (ip, mask) = cidr.split('/') 13 | mask ||= "32" 14 | mask = mask.to_i 15 | raise "Bad mask" if mask == 0 or mask > 32 16 | mask += 8 17 | cidr_start = pack_ipv4(ip).unpack('B*').first.to_i(2) & @masks[mask].unpack('B*').first.to_i(2) 18 | cidr_start = ["%040B" % cidr_start].pack("B*") 19 | cidr_end = add_bit(cidr_start, mask) 20 | 21 | @ranges[cidr_start] += 1 || @ranges.delete(cidr_end) 22 | @ranges[cidr_end] -= 1 || @ranges.delete(cidr_end) 23 | end 24 | 25 | def list 26 | results = [] 27 | start = total = 0 28 | @ranges.keys.sort.each do |ip| 29 | start = ip if total == 0 30 | total += @ranges[ip] 31 | 32 | if total == 0 33 | while start < ip 34 | bits = p_end = nil 35 | start_bits = start.unpack('b*').first 36 | sbit = @nbits - 1 37 | 38 | sbit -= 1 while (start_bits[sbit^7] == "0" and sbit > 0) 39 | 40 | ((sbit+1)..@nbits).each do |pos| 41 | p_end = add_bit(start, pos) 42 | if p_end <= ip 43 | bits = pos - 8 44 | break 45 | end 46 | end 47 | 48 | results << unpack_ipv4(start) + "/#{bits}" 49 | start = p_end 50 | end 51 | end 52 | end 53 | 54 | results 55 | end 56 | 57 | private 58 | 59 | def pack_ipv4(ip) 60 | nums = ip.split('.').map(&:to_i) 61 | return unless nums.length == 4 62 | return unless nums.all?{ |n| n >= 0 and n.to_i <= 255 } 63 | nums.unshift(0).pack('C*') 64 | end 65 | 66 | def unpack_ipv4(ip) 67 | ip.unpack('xC*').join('.') 68 | end 69 | 70 | def add_bit(addr, mask_bits) 71 | mask_bits -= 1 72 | addr_bits = addr.unpack('b*').first 73 | 74 | while addr_bits[mask_bits^7] == "1" do 75 | addr_bits[mask_bits^7] = "0" 76 | mask_bits -= 1 77 | end 78 | addr_bits[mask_bits ^ 7] = "1" 79 | [addr_bits].pack('b*') 80 | end 81 | end 82 | -------------------------------------------------------------------------------- /lib/choices.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'choice' 4 | 5 | Choice.options do 6 | 7 | separator '' 8 | separator 'Update IP Ranges' 9 | 10 | option :update_ip_ranges do 11 | short '-i' 12 | long '--ip' 13 | desc 'Update IP ranges' 14 | end 15 | 16 | separator '' 17 | separator 'Make Rules Files' 18 | 19 | option :generate_config_files do 20 | short '-g' 21 | long '--generate' 22 | desc 'Generate config files' 23 | end 24 | 25 | separator '' 26 | separator 'Misc' 27 | 28 | option :version do 29 | short '-v' 30 | long '--version' 31 | desc 'Show version' 32 | action do 33 | puts PROGRAM_VERSION 34 | exit 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/handler.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'json' 4 | require 'open-uri' 5 | require 'resolv' 6 | require_relative 'addr_merger' 7 | 8 | module Butter 9 | class Handler 10 | 11 | CONFIG = JSON.parse File.read("#{ROOT_PATH}/config.json") 12 | DNS_SERVER = Resolv::DNS.new({nameserver_port: [['208.67.222.222', 443]]}) 13 | 14 | def update_ip_ranges 15 | %w[aws cf domains asn].each do |fact| 16 | send "fetch_ip_#{fact}" 17 | end 18 | combine_ip_ranges 19 | end 20 | 21 | def fetch_ip_aws 22 | data = read_json_url 'https://ip-ranges.amazonaws.com/ip-ranges.json' 23 | data = data['prefixes'].keep_if do |p| 24 | p['service'] == 'AMAZON' && !p['region'].start_with?('cn-') 25 | end 26 | data.map! { |p| p['ip_prefix'] } 27 | save_ip_ranges 'aws', data 28 | end 29 | 30 | def fetch_ip_cf 31 | data = read_url('https://www.cloudflare.com/ips-v4').split("\n") 32 | save_ip_ranges 'cloudflare', data 33 | end 34 | 35 | def fetch_ip_domains 36 | save_ip_ranges 'domains', CONFIG['domains'].map { |h| DNS_SERVER.getaddress h } 37 | end 38 | 39 | def fetch_ip_asn 40 | CONFIG['networks'].each do |name, asn_list| 41 | ranges = Array(asn_list).map do |asn| 42 | result = `whois -h whois.radb.net -- '-i origin #{asn}'` 43 | result = result.split("\n").grep(/^route:/) 44 | result.map { |i| i.split(/\s+/).last } 45 | end 46 | ranges.flatten! 47 | ranges = addr_merge ranges 48 | save_ip_ranges name, ranges 49 | end 50 | end 51 | 52 | def combine_ip_ranges 53 | ranges = Dir.glob "#{ROOT_PATH}/data/ip-ranges/*.json" 54 | ranges.map! { |f| JSON.parse open(f).read } 55 | ranges.flatten! 56 | ranges = addr_merge ranges 57 | save_json 'data/ip-ranges', ranges 58 | end 59 | 60 | def generate_config_files 61 | rules_dns 62 | rules_router 63 | end 64 | 65 | def rules_dns 66 | data_dir = "#{ROOT_PATH}/data/dnsmasq/dnsmasq.d" 67 | domains = CONFIG['domains'] 68 | addresses = read_json_file 'data/ip-ranges/domains' 69 | 70 | File.open "#{data_dir}/addresses.conf", 'w' do |f| 71 | domains.zip(addresses).each do |domain, address| 72 | f.puts "address=/#{domain}/#{address}" 73 | end 74 | end 75 | 76 | forwarded = CONFIG['resolving'].map { |domain| "server=/#{domain}/127.0.0.1#5353" } 77 | File.write "#{data_dir}/forwarded.conf", forwarded.join("\n") 78 | end 79 | 80 | def rules_router 81 | vpn_gateway = 'pptp-out1' 82 | ip_ranges = read_json_file 'data/ip-ranges' 83 | rules = ['/ip route remove [/ip route find gateway=pptp-out1 comment=gfw-butter]'] 84 | rules.concat ip_ranges.map{ |i| "/ip route add dst-address=#{i} gateway=#{vpn_gateway} comment=gfw-butter" } 85 | File.write "#{ROOT_PATH}/data/router_os/rules.txt", rules.join("\n") 86 | end 87 | 88 | private 89 | 90 | def read_json_url(uri) 91 | JSON.parse open(uri).read 92 | end 93 | 94 | def read_json_file(path) 95 | JSON.parse open("#{ROOT_PATH}/#{path}.json").read 96 | end 97 | 98 | def read_url(url) 99 | open(url).read 100 | end 101 | 102 | def save_json(path, data) 103 | File.write "#{ROOT_PATH}/#{path}.json", JSON.pretty_generate(data) 104 | end 105 | 106 | def save_ip_ranges(group, data) 107 | save_json "data/ip-ranges/#{group}", data 108 | end 109 | 110 | def addr_merge(ranges) 111 | merger = AddrMerger.new 112 | ranges.each { |i| merger.add i } 113 | merger.list 114 | end 115 | 116 | 117 | end 118 | end 119 | 120 | 121 | --------------------------------------------------------------------------------