Build Nginx reverse proxy for sci-hub

Introduction

Sci-Hub is a website with over 64.5 million academic papers and articles available for direct download. It bypasses publisher paywalls by allowing access through educational institution proxies. Sci-Hub stores papers in its own repository, and additionally the papers downloaded by Sci-Hub are also stored in Library Genesis (LibGen). From Wiki

Here is a note of how to build a reverse proxy to the sci-hub.cc just for personal use.

Envioronment

Linux

Docker

Nginx image

Scripts

Nginx configuration files

Conf for the main site conf_folder/default.conf

Change the following ip address to the ip of the docker.
Change the ports of each subdomains to any ports unused, just need to in consistent with the ports used by the corresponding containers

Use chrome app to revise request urls

Download a chrome app which can automatically change request urls, here I use Requestly

Set rules to replace strings in the urls

How to use

Click on the link of the DOI

Then it will be redirect to:http://192.168.3.23:18000/10.1016/j.neunet.2014.09.003 (in this example)

Summary

This method allows to use the doi links to access the fulltext of the citation. I know the scripts I showed here is not perfect. Maybe using a single container with multiple virtualhosts for both main site and subdomains would be a better solution.