Unlocking Google Scholar

Google Scholar is a commonly used tool for academic paper searches, but being a Google service, it requires proxy access in mainland China.

However, both of my VPS servers have unclean IPs and can’t even open the homepage. Even with Warp enabled, I can only access the homepage, but searching for any content results in the image below.

sorry.png

After researching some materials, I found that Scholar generally only blocks IPv4. So I first tried modifying the hosts file on the proxy node according to the documentation.

/etc/hosts
Code
1
2
3
4
2404:6800:4008:c06::be scholar.google.com
2404:6800:4008:c06::be scholar.google.com.hk
2404:6800:4008:c06::be scholar.google.com.tw
2404:6800:4005:805::200e scholar.google.cn

Then I found that local access through Clash still couldn’t work, but curl from the VPS was successful. After investigation, I discovered that wget from the VPS’s Docker container would show:

Plain
1
2
Connecting to scholar.google.com ([2404:6800:4008:c06::be]:443)
wget: can't connect to remote host: Network unreachable

It seems the Docker container inherited the host’s hosts file but doesn’t have IPv6 resolution. It turns out Docker doesn’t enable IPv6 by default, so I tried modifying its configuration file.

/etc/docker/daemon.json
JSON
1
2
3
4
{
  "ipv6": true,
  "fixed-cidr-v6": "2001:db8:1::/64"
}

And modified docker-compose.yml to add IPv6 support to the network.

docker-compose.yml
YAML
1
2
3
4
networks:
  proxy_net:
    driver: bridge
    enable_ipv6: true

Then restart the Docker service and rebuild the Docker containers.

Shell
1
2
sudo systemctl restart docker
docker compose down && docker compose up -d

Here, bringing down all services first is necessary because the network configuration needs to be reloaded.

After that, local access to Scholar works normally.


Last modified on 2025-07-06

Git Version: c9be4f8