Skip to content

tmphosts is a lightweight, temporary reverse proxy solution that allows users to easily reroute traffic to different hosts by modifying their local hosts file. Built on Nginx, tmphosts also seamlessly handles HTTP to HTTPS redirection, ensuring a secure browsing experience.

License

Notifications You must be signed in to change notification settings

huangsen365/tmphosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmphosts

English | 中文

tmphosts is a lightweight, temporary reverse proxy solution that allows users to easily reroute traffic to different hosts by modifying their local hosts file. Built on Nginx, tmphosts also seamlessly handles HTTP to HTTPS redirection, ensuring a secure browsing experience.

Prerequisites

  • Docker installed on your system

Getting Started

Option 1 (Recommended): Use the pre-built image from Docker Hub

  1. Run the Docker container:
docker run -d --name tmphosts -p 80:80 -p 443:443 --restart always huangsen365/tmphosts

Option 2: Build the Docker image locally

  1. Clone the repository:
git clone https://github.com/huangsen365/tmphosts.git
  1. Change to the tmphosts directory:
cd tmphosts
  1. Build the Docker image:
docker build -t tmphosts .
  1. Run the Docker container:
docker run -d --name tmphosts -p 80:80 -p 443:443 --restart always tmphosts

Configuration

  1. Modify your local hosts file to add entries pointing to the public IP address where tmphosts is running (e.g., 123.123.123.123 example.com):

    • Windows: Edit the file C:\Windows\System32\drivers\etc\hosts using a text editor with administrator privileges.
    • Linux & macOS: Edit the file /etc/hosts using a text editor with root or sudo privileges.
  2. Access the websites using their HTTPS versions (e.g., https://example.com).

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

tmphosts is a lightweight, temporary reverse proxy solution that allows users to easily reroute traffic to different hosts by modifying their local hosts file. Built on Nginx, tmphosts also seamlessly handles HTTP to HTTPS redirection, ensuring a secure browsing experience.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published