﻿!! This bundle is only for people physically inside mainland China
====================================================================
If you are outside China, ignore it. You do not need it, and installing it
makes things worse.

What it does: sends mainland-China IP ranges over your LOCAL network and keeps
only foreign traffic inside the VPN. That only holds if you are in China.

If you are abroad: your local connection is already the slow path to Chinese
sites, so handing China traffic to it makes them slower still. And what users
abroad usually want is the opposite - a Chinese IP via the VPN to reach services
back home (video, music, banking, games). This script is exactly what breaks
that. Just download the Cisco client on its own from the page above.

ViPiN Split Routing Tool - Instructions
=======================================

What's in this archive
----------------------
  China-Direct-Abroad-via-VPN.bat          The split-routing script (run it after connecting)
  windows-lan-split-route.ps1     The script the .bat actually calls
  chnroute.txt                    China IP ranges, required by the script


What problem this solves
------------------------
Once you connect, the VPN client installs a "send everything through the tunnel"
route. That means:

  * Chinese sites are reached the long way round - slow, and often flagged as a
    login from an unusual location

After you run the script, all mainland-China IP ranges go through your local
network. Only foreign traffic enters the VPN.

(Printers, NAS boxes and router admin pages already work: the server hands your LAN back to the local network, so this tool no longer touches it.)

(Printers, NAS boxes and router admin pages already work — the server hands
your LAN back to the local network automatically, so this tool no longer
touches it.)


How to use it
-------------
1. Install the Cisco client first, from the download table on this page
   (the Cisco client column, Windows row). It is not bundled here - the client
   is already offered on its own, and shipping a second copy would add 25 MB
   to this archive for nothing.

2. Open the Cisco client and connect to the VPN. Make sure it says connected.

3. Double-click China-Direct-Abroad-via-VPN.bat.
   Windows will ask for administrator approval - click Yes. Changing the routing
   table requires it.

4. Wait until it reports it is done. Chinese sites now connect directly, while
   everything else goes through the VPN.


When to run it again
--------------------
  * Every time you reconnect the VPN - disconnecting clears these routes
  * After changing networks (a different Wi-Fi) - your local gateway changed, so
    the old routes point at an address that no longer exists


Troubleshooting
---------------
Q: It says it cannot read the China IP range table
A: chnroute.txt is not in the same folder as the .bat. Extract the WHOLE archive;
   do not drag the .bat out on its own.

Q: No administrator prompt appeared, the window just flashed
A: Right-click the .bat and choose "Run as administrator".

Q: After running it the VPN dropped, or foreign sites stopped working
A: Disconnect and reconnect the VPN. These routes are temporary and reconnecting
   restores a working state.

Q: How do I undo it
A: Just disconnect the VPN - the routes stop applying.


What running it actually changes
--------------------------------
[What it touches]
  Only the routing table, and only temporarily. No drivers, no system settings,
  nothing left running in the background, and it does not touch DNS.

[What gets better]
  * Chinese sites connect directly - faster, and no "login from an unusual
    location" warnings
  * Foreign traffic still goes through the VPN, so nothing is lost there

[What it costs you]
  * Chinese sites now see your real local IP, not the VPN's. If you were using
    the VPN specifically to hide your location from a Chinese site, this script
    defeats that - do not use it in that case.
  * The China IP list is a static snapshot. Newly allocated ranges count as
    foreign until the list is refreshed, so they go through the VPN.
  * **Some Chinese sites will still be slow. This is a known limit, not a bug.**
    The script only changes routing; it does not touch DNS. Names are still
    resolved by the VPN's DNS server, and many Chinese companies also run
    mirrors abroad. Asked from abroad, DNS hands back the foreign mirror's
    address - which is not in the China IP list, so the script treats it as
    foreign traffic and sends it through the VPN. You end up reaching a Chinese
    company over its foreign mirror through the VPN, which is slower than going
    direct.
    Mostly affects large sites with a global CDN (cloud services, portals,
    download sites). Sites that only serve China are unaffected.
  * Administrator approval is required.

[What it does not affect]
  * System proxy settings, browser settings, other applications
  * Your VPN client's account, profile or connection history

[How to undo it]
  Just disconnect the VPN. The routes stop applying and nothing is left behind.

Need help? Our support is available 24/7: https://www.anyfq.com/contact
