{"id":16641819,"url":"https://github.com/samthor/https-forward","last_synced_at":"2025-10-30T11:31:19.299Z","repository":{"id":57603165,"uuid":"194788030","full_name":"samthor/https-forward","owner":"samthor","description":"A forwarding HTTPS server using Let's Encrypt","archived":false,"fork":false,"pushed_at":"2022-04-05T02:26:59.000Z","size":41,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-02T08:11:20.284Z","etag":null,"topics":["go","golang","https","letsencrypt"],"latest_commit_sha":null,"homepage":"https://snapcraft.io/https-forward","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.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":null,"support":null}},"created_at":"2019-07-02T04:27:08.000Z","updated_at":"2024-04-22T17:35:21.000Z","dependencies_parsed_at":"2022-09-26T22:30:17.746Z","dependency_job_id":null,"html_url":"https://github.com/samthor/https-forward","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fhttps-forward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fhttps-forward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fhttps-forward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fhttps-forward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/https-forward/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238960273,"owners_count":19559233,"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":["go","golang","https","letsencrypt"],"created_at":"2024-10-12T07:47:59.296Z","updated_at":"2025-10-30T11:31:14.066Z","avatar_url":"https://github.com/samthor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![https-forward](https://snapcraft.io//https-forward/badge.svg)](https://snapcraft.io/https-forward)\n[![https-forward](https://snapcraft.io//https-forward/trending.svg?name=0)](https://snapcraft.io/https-forward)\n\n(Watch [a video about https-forward](https://www.youtube.com/watch?v=CL0fC1hD54M)!)\n\nProvides a forwarding HTTPS server which transparently fetches and caches certificates [via Let's Encrypt](https://godoc.org/golang.org/x/crypto/acme/autocert).\nThis must run on 443 and 80 (http:// just forwards to https://, no forwarding happens unencrypted) and can't coexist with any other web server on your machine.\n\n## Why\n\nThis is so you can host random and long-lived services publicly on the internet—perfect for _other_ services which are served on http://, don't care about certificates or HTTPS at all, and might be provided by Node or Go on a random high port (e.g., some dumb service running on `localhost:8080`).\n\n**Note!** This doesn't magic up domain names.\nYou would use this service only if you're able to point DNS records to the IP address of a machine you're running this on, and that the machine is able to handle incoming requests on port 443 and 80 (e.g., on a home network, you'd have to set up port forwarding on your router).\n\n## Install\n\n⚠️ You should probably install this via [Snap](https://snapcraft.io/https-forward) if you're using Ubuntu or something like it.\n\nOtherwise, you can build the Go binary and see `--help` for flags.\nYou _should_ restrict the binary's permissions or run it as `nobody` with a `setcap` configuration that lets it listen on low ports.\n\n## Configuration\n\nIf you're using Snap, the configuration file is at `/var/snap/https-forward/common/config` (which is empty after install).\nOtherwise, the default configuration is read at `/etc/https-forward`.\n\nEither way, it should be authored like this:\n\n    # hostname            forward-to          optional-basic-auth\n    host.example.com      localhost:8080\n    blah.example.com      192.168.86.24:7999  user:pass\n    user-only.example.com localhost:9002      user       # accepts any password\n   \n    # Specify host with '.' to suffix all following\n    .example.com\n    test                  localhost:9000\n    under-example         any-hostname-here.com:9000\n    \n    # Clear the current suffix with a single \".\" (otherwise below would be \"*.example.com.example.com\")\n    .\n\n    # You can include ? or * to glob-match domain parts (this does NOT match \"-\")\n    *.example.com         localhost:9000\n    test-v?*.example.com  localhost:9999    # matches \"test-v1\", \"test-v100\", but NOT \"test-v\" or \"test-vx-123\"\n\n    # serves a blank dummy page (but generate https cert, perhaps as a placeholder)\n    serves-nothing.example.com\n\n(example.com used above purely as an _example_.\nYou'd replace it with a domain name you controlled, preferably with a [wildcard DNS](https://en.wikipedia.org/wiki/Wildcard_DNS_record) record like `*.example.com`.)\n\nRestart or send `SIGHUP` to the binary to reread the config file.\n\n## Notes\n\nIf incoming HTTPS requests take a long time and then fail, Let's Encrypt might have throttled you.\nUnfortunately, the `autocert` client in Go isn't very verbose about this.\nThis happens on a per-domain basis (rather than say, from your client IP), so just try a new domain (even a subdomain).\n\nThis service only forwards _to_ `http://` hosts, not secure hosts.\n\n## Release Instructions\n\nFollow the guide for [Go applications](https://snapcraft.io/docs/go-applications).\nRun `snapcraft` and it will probably just build.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Fhttps-forward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Fhttps-forward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Fhttps-forward/lists"}