{"id":15831435,"url":"https://github.com/somajitdey/isp","last_synced_at":"2025-10-17T22:10:17.807Z","repository":{"id":163920162,"uuid":"434228198","full_name":"SomajitDey/isp","owner":"SomajitDey","description":"An Idiotic SSL Passthrough","archived":false,"fork":false,"pushed_at":"2021-12-02T14:22:20.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-12T12:21:35.112Z","etag":null,"topics":["reverse-proxy","server-name-indication","sni","ssl","ssl-passthrough","ssl-tunnel","tcp-proxy","tcpdump","tls"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/SomajitDey.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-02T13:19:03.000Z","updated_at":"2022-11-06T13:46:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"c96df4c8-7662-4c0c-9d61-9bd7279682ab","html_url":"https://github.com/SomajitDey/isp","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"a1a83d5b9e9102303db9426ec7993e46992b6ea0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomajitDey","download_url":"https://codeload.github.com/SomajitDey/isp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246634391,"owners_count":20809232,"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":["reverse-proxy","server-name-indication","sni","ssl","ssl-passthrough","ssl-tunnel","tcp-proxy","tcpdump","tls"],"created_at":"2024-10-05T12:02:44.441Z","updated_at":"2025-10-17T22:10:17.749Z","avatar_url":"https://github.com/SomajitDey.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Idiotic SSL Passthrough\r\n\r\nDidn't feel like doing anything today. So, wrote this silly reverse-proxy that doesn't terminate SSL/TLS but passes it through to the desired backends. The best (worst) thing is it's written in `Bash`, and uses only your familiar Unix tools  such as `grep` and `xxd`. Tested in Linux.\r\n\r\n### Usage\r\n\r\n1. Install the `isp` script in `PATH`. If you're into these things you probably know how. If you don't, feel free to [ask me](mailto:dey.somajit@gmail.com).\r\n\r\n2. Have an executable or bash script that does the following. Whenever you give a fully qualified domain name (fqdn) to it as an argument, it spits a TCP port number or the path to some Unix domain socket. This executable may be called the `router`.\r\n\r\n3.  Launch the reverse-proxy as follows, with `socat` \r\n\r\n   ```bash\r\n   socat TCP-L:$HTTPS_PORT,fork,reuseaddr SYSTEM:\"isp -d $DOMAIN /path/to/router\"\r\n   ```\r\n\r\n   `HTTPS_PORT` is self-evident. `DOMAIN` holds the base domain, whose subdomains need to be routed. E.g. in order to route different subdomains of the form `*.example.com` to different backends, `DOMAIN=example.com`. The router's job is output the port of socket for any given subdomain, `route-me.example.com`.\r\n\r\n### Test Drive\r\n\r\nLet's do a little testing. The sample [`router`](/router) provided herein routes requests for `localhost` to port `9091`, for `www.localhost` to `9092`, for `localtest.me` to `9093` and the remaining to `9094`.\r\n\r\n1. `cd` to the `isp` repo that you `git-clone`d.\r\n\r\n2. Set up the reverse-proxy \r\n\r\n   ```bash\r\n   sudo socat TCP-L:443,fork,reuseaddr \\\r\n   \tSYSTEM:'./isp -d localhost -d localtest.me ./router'\r\n   ```\r\n\r\n3. In a new tab, set up a listener at port 9091 with  `nc -lk 9091`. Whenever it receives a request it's gonna dump it to STDOUT.\r\n\r\n4. Using a browser or `curl` load https://localhost. Did the above listener at `9091` dump anything?\r\n\r\n5. Similarly for other ports and domain names.\r\n\r\n6. Edit the  [`router`](/router) to your liking and play along (as if you've got nothing else to do).\r\n\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomajitdey%2Fisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomajitdey%2Fisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomajitdey%2Fisp/lists"}