Viki

Viki 写东西的地方

努力上进且优秀
github
email
x
steam
bilibili
douban

Bypassing tplogin.cn redirection to access the TP-LINK router management page via the public network

Solution#

First, let's talk about the solution. By configuring a proxy with nginx and using its replacement feature, we can modify the hardcoded judgment logic in the front-end page.

server {
  # Exposed port
  listen 1234;

  location / {
    # Management page address
    proxy_pass http://192.168.0.1/;
    # Key logic, replace the hardcoded domain detection in the front end
    subs_filter 'tplogin.cn' 'your.domain.com';
    # Set to take effect for all file types
    subs_filter_types *;
}

If you encounter an error indicating that the subs_filter module is unavailable, you can try installing nginx-extras or compile it from source to resolve the issue.

Finally, restart the nginx service to take effect.

# sudo systemctl restart nginx
nginx -s reload

Background#

Recently, I've been tinkering with a home cloud, applied for a public IP, and exposed some services to the wide area network.

To be continued.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.