{"id":13581622,"url":"https://github.com/go-compile/localrelay","last_synced_at":"2025-10-23T11:31:30.619Z","repository":{"id":139680274,"uuid":"469359124","full_name":"go-compile/localrelay","owner":"go-compile","description":"A reverse proxying program to allow services e.g. Nextcloud, Bitwarden etc to be accessed over Tor (SOCKS5) even when the client app do not support SOCKS proxies.","archived":false,"fork":false,"pushed_at":"2024-10-21T20:22:18.000Z","size":1924,"stargazers_count":20,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-30T18:05:53.590Z","etag":null,"topics":["bitwarden","hidden-services","mobile","nextcloud","proxy","reverse-proxy","selfhosted","socks","tor"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/gocompile/localrelay","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-compile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-13T12:04:46.000Z","updated_at":"2025-01-17T06:49:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e39026f-711c-416d-85c3-c7309a340f26","html_url":"https://github.com/go-compile/localrelay","commit_stats":{"total_commits":357,"total_committers":1,"mean_commits":357.0,"dds":0.0,"last_synced_commit":"f11b0ad4cedefd7d95e7314940ba34c8c8a7fea3"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-compile%2Flocalrelay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-compile%2Flocalrelay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-compile%2Flocalrelay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-compile%2Flocalrelay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-compile","download_url":"https://codeload.github.com/go-compile/localrelay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237821541,"owners_count":19371780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitwarden","hidden-services","mobile","nextcloud","proxy","reverse-proxy","selfhosted","socks","tor"],"created_at":"2024-08-01T15:02:08.259Z","updated_at":"2025-10-23T11:31:25.227Z","avatar_url":"https://github.com/go-compile.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Localrelay\n\n[![GitHub release](https://img.shields.io/github/release/go-compile/localrelay.svg)](https://github.com/go-compile/localrelay/releases)\n[![Go Report Card](https://goreportcard.com/badge/go-compile/localrelay)](https://goreportcard.com/report/go-compile/localrelay)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/go-compile/localrelay)\n[![Docker Size](https://img.shields.io/docker/image-size/gocompile/localrelay?sort=date)](https://hub.docker.com/r/gocompile/localrelay/)\n[![Docker Version](https://img.shields.io/docker/v/gocompile/localrelay?label=docker%20version\u0026sort=semver)](https://hub.docker.com/r/gocompile/localrelay/)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/go-compile/localrelay/.github/workflows/go.yml)\n\n\u003cimg align=\"right\" width=\"100\" height=\"100\" src=\"./icon.png\"\u003e\n\nLocalrelay is a cross platform (Windows, Linux, Mac, Android, and more) reverse proxy which allows the destination address to be customised and can even use a SOCKS5 proxy. Supporting both raw TCP connections and HTTP/HTTPS connections. **Localrelay allows you to host services e.g. Nextcloud on Tor and access it on your mobile or laptop anywhere without needing to open your firewall**.\n\n\u003cdiv align=center\u003e\n\n**[\\[ Wiki \u0026 Guide \\]](https://github.com/go-compile/localrelay/wiki)**\n[\\[ Download Release \\]](https://github.com/go-compile/localrelay/releases/latest)\n[\\[ Docker Image \\]](https://hub.docker.com/r/gocompile/localrelay)\n\n\u003c/div\u003e\n\n\n\n## Common Localrelay Use Cases\n\n1. **YOUR HOME LAB AWAY FROM HOME**\u003cbr/\u003e\nLocalrelay is commonly used with failover proxies to allow for custom routing rules based on network connectivity. Connect directly to your home lab via the IP when on your home network, and when away, connect via a hop server or proxy!\n\n\u003e When **home connect directly to the IP**, when away from home **connect with Tor**! Or when away connect via a hop server, or several.\n\n2. **FORCE APPLICATIONS TO USE TOR**\u003cbr/\u003e\nAnother use of Localrelay is force an application which doesn't allow for proxies to use one. For example, you can force Bitwarden to connect over Tor, or force Nextcloud to do the same.\n\n\u003e Protect your IP and force applications to use SOCKS5 proxies even when they don't natively support it, all possible with Localrelay.\n\n3. **FAILOVER ROUTING**\u003cbr/\u003e\nPrevent service downtime by setting up failover relays for TCP, UDP, HTTP or HTTPS destinations. Localrelay will automatically pick the next available destination and route your traffic over it.\n\n\u003e Stop downtime, setup failover routing to ensure you always have a route to your destination. You can even setup proxy failover, if one SOCKS proxy fails, use another automatically! All can be configured exactly how you wish with a simple config file.\n\n4. **LOADBALANCING WITH FAILOVER**\u003cbr/\u003e\nDistribute your load evenly, or bias using weights, with Localrelay load balancer.\n\n\u003e Load balance your server connections for HTTP(s), TCP, or UDP. Or setup your browser to load balance between SOCKS5 proxies, giving you a new IP address per website you visit! \n\n---\n\nIf you self host a service for example; [Bitwarden](https://github.com/dani-garcia/vaultwarden), [Nextcloud](https://github.com/nextcloud), [Syncthing](https://github.com/syncthing/syncthing), [Grafana](https://github.com/grafana/grafana), [Gitea](https://github.com/go-gitea/gitea)... You may not want to expose your public IP address to the internet, you may prefer to protect it behind Tor.\n\nAccess your local or remote services securely over [Tor](https://www.torproject.org/) without needing to port forward.\n\nMany apps such as Nextcloud, Termis and Bitwarden do not allow you to specify a proxy when connecting to your self-hosted server. Localrelay allows you to host a local reverse proxy on your devices loopback. This relay then encrypts the outgoing traffic through your set SOCKS5 proxy (Tor: 127.0.0.1:9050).\n\nWhen at **home connect locally**, when away **connect over Tor**. Securely connect remotely over Tor without port forwarding AND when at home connect directly with high speeds.\n\n### Features\n- Proxy TCP, UDP, HTTP, and HTTPS connections\n- Use SOCKS5 proxies for all remote hosts, some or none, completely customisable!\n- Load balance.\n- Failover.\n- Failover with SOCKS5 proxies.\n- Run relays in the background and start at boot.\n- View active connections, source, destination, relay and active duration.\n- View each relay's bandwidth live (auto updating stats page).\n- Drop connections via the CLI.\n- Drop all connections from a specified IP.\n- Stop, start, restart relays ran by the service.\n- CLI to create relay configs.\n- Built in HTTP API over a unix socket.\n- View all connected IP addresses.\n\n### Manage the Localrelay Service\n\nYou can optionally install Localrelay as a service/daemon on Windows, Mac, Linux, and Unix other like systems to **run your relays in the background** and start at boot. \n\n\n| Reverse Proxy Screenshots |\n|:--:|\n| ![Localrelay CLI status command](./.github/images/localrelay_status2-fs8.png) |\n| ![Localrelay CLI monitor proxies](./.github/images/localrelay_monitor-fs8.png) |\n| ![Localrelay CLI view connected IP addresses to relays](./.github/images/localrelay_conns_ips-fs8.png) |\n| ![Relay spoofing useragent \u0026 using Tor](./examples/http-privacy/access-tor.png)|\n\n### Install \u0026 Build\n\nTo install Localrelay you can either build from source, or use one of the installers.\n\n- [Install Localrelay for Windows](https://github.com/go-compile/localrelay/wiki/Install)\n- [Install Localrelay for Ubuntu and Debian](https://github.com/go-compile/localrelay/wiki/Install)\n- [Install Localrelay for Android](https://github.com/go-compile/localrelay/wiki/Install)\n- [Install Localrelay Universal Linux](https://github.com/go-compile/localrelay/wiki/Install)\n- [Install Localrelay for Mac](https://github.com/go-compile/localrelay/wiki/Install)\n\n## CLI Usage\n\nThis is a basic overview, [view the wiki for more detailed information](https://github.com/go-compile/localrelay/wiki/CLI).\n\n### Create Relay\n\nTo run a relay you must first create a relay config, this allows for permanent storage of relay configuration and easy management. You can create as many of these as you like.\n\n#### Syntax\n\n```sh\n# Create a simple TCP relay\nlocalrelay new \u003crelay_name\u003e -host \u003cbind_addr\u003e -destination \u003cremote_addr\u003e\n\n# Create HTTP relay\nlocalrelay new \u003crelay_name\u003e -host \u003cbind_addr\u003e -destination \u003cremote_addr\u003e -http\n\n# Create HTTPS relay\nlocalrelay new \u003crelay_name\u003e -host \u003cbind_addr\u003e -destination \u003cremote_addr\u003e -https -certificate=cert.pem key=key.pem\n\n# Use proxy\nlocalrelay new \u003crelay_name\u003e -host \u003cbind_addr\u003e -destination \u003cremote_addr\u003e -proxy \u003cproxy_url\u003e\n\n# Set custom output config file\nlocalrelay new \u003crelay_name\u003e -host \u003cbind_addr\u003e -destination \u003cremote_addr\u003e -output ./config.toml\n\n# Create a failover TCP relay\nlocalrelay new \u003crelay_name\u003e -host \u003cbind_addr\u003e -destination \u003cremote_addr_(1)\u003e,\u003cremote_addr_(2)\u003e -failover\n```\n\n#### Examples\n\n```sh\n# Create a simple TCP relay\nlocalrelay new example.com -host 127.0.0.1:8080 -destination example.com:80\n\n# Create HTTP relay\nlocalrelay new example.com -host 127.0.0.1:8080 -destination http://example.com -http\n\n# Create HTTPS relay\nlocalrelay new example.com -host 127.0.0.1:8080 -destination https://example.com -https -certificate=cert.pem key=key.pem\n\n# Create a TCP relay and store it in the config dir to auto start on system boot (daemon required)\nsudo localrelay new example.com -host 127.0.0.1:8080 -destination example.com:80 -store\n\n# Use proxy\nlocalrelay new onion -host 127.0.0.1:8080 -destination 2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion:80 -proxy socks5://127.0.0.1:9050\n\n# Create a failover TCP relay with one remote accessed via Tor\nlocalrelay new onion -host 127.0.0.1:8080 -destination 192.168.1.240:80,2gzyxa5ihm7nsggfxnu52rck2vv4rvmdlkiu3zzui5du4xyclen53wid.onion:80 -failover -ignore_proxy=0 -proxy socks5://127.0.0.1:9050\n```\n\n\u003cdiv align=\"center\"\u003e\n\u003cbr\u003e\n\n**[Installation And Usage Guide On The Wiki](https://github.com/go-compile/localrelay/wiki)**\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-compile%2Flocalrelay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-compile%2Flocalrelay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-compile%2Flocalrelay/lists"}