Skip to content

noVibe/Locality

Repository files navigation

English | Русский

Locality

Forwarding internet sites to a local IP using a Nginx reverse proxy.

This is useful when you have a device on your local network that needs access to resources that are directly blocked or restricted on that specific device.

How it works

flowchart TB
subgraph LAN["🏠 Local Network"]
subgraph ClientMachine["💻 Client Machine"]
Browser[🌐 Browser]
end

subgraph LocalityServer["🖥️ Locality Server
(e.g. 192.168.0.237)"]
direction LR
WebUI["Web Interface :8099<br/><i>Display and Manage proxies</i>"]
Nginx[Nginx Proxy<br/>Ports 8100-8200]
end
end

subgraph Internet["🌍 Internet"]
Claude[claude.ai]
Gemini[gemini.google.com]
ChatGPT[chatgpt.com]
end

Browser -->|"Proxy setup"| WebUI
Browser -->|"https://192.168.0.237:8100"| Nginx
Browser -->|"https://192.168.0.237:8101"| Nginx
Browser -->|"https://192.168.0.237:810X"| Nginx

WebUI -.->|"Create/Delete configs"| Nginx

Nginx -->|"Port 8100 → claude.ai"| Claude
Nginx -->|"Port 8101 → gemini.google.com"| Gemini
Nginx -->|"Port 8102 → chatgpt.com"| ChatGPT

style LAN color:white,fill:#1a1a2e,stroke:#6366f1,stroke-width:3px
style ClientMachine fill:#16213e,stroke:#10b981,stroke-width:2px,color:white
style LocalityServer fill:#16213e,stroke:#ef4444,stroke-width:2px,color:white
style WebUI fill:#6366f6,color:#fff
style Nginx fill:#10b981,color:#fff
style Internet fill:#0f3460,stroke:#888,stroke-dasharray: 5 5

linkStyle default stroke:#22d3ee,stroke-width:2px
Loading
  1. You launch Locality on a device with unrestricted internet access (e.g., your home PC).
  2. Locality starts up on your local network at: https://{local device IP}:{WEB_INTERFACE_PORT from .env file}.
  3. Connect to this address via the Locality web interface from any other device on your local network (e.g., a corporate laptop).
  4. Skip the security warning upon first connection (more on this below).
  5. In the web interface, add the websites you need to access. Locality will "forward" them to a local IP.

Security

At the first visit on Locality web-ui, browser warns about the certificate because it is unknown to authorized Certificate Authorities (CA) and is not added to the device's trusted certificate store. This does not make the connection any less secure.

  1. The connection to your local IP is established via HTTPS. Therefore, all requests are encrypted
  2. Nginx generates a new encryption certificate when Locality starts.
  3. MITM Protection: Alerts on TLS downgrades (below 1.3). This indicates that traffic is being intercepted and decrypted by an intermediary (e.g., a corporate firewall or antivirus).

Getting Started

Locality requires nothing but Docker. The entire application lifecycle takes place inside the container.

  1. Clone the repository (or download the ZIP archive):

     git clone https://github.com/novibe/locality.git
    
  2. Navigate to the Locality folder

  3. Configure ports in the .env file if necessary

  4. Launch Locality with the command:

     docker compose up -d
    
  5. Go to https://{local device IP}:{WEB_INTERFACE_PORT from .env file}

How to find your local IP

Typically, a local IP looks like 192.168.0.x.

On Windows

Open the command prompt and run: ipconfig | findstr /i "IPv4"

On Linux / MacOS

Open the terminal and run: hostname -I

About

Reverse proxy: redirect domain to local IP

Resources

Stars

Watchers

Forks

Packages

No packages published