{"id":37020852,"url":"https://github.com/erikvanzijst/scala_tlsproxy","last_synced_at":"2026-01-14T02:26:17.364Z","repository":{"id":57733140,"uuid":"394981295","full_name":"erikvanzijst/scala_tlsproxy","owner":"erikvanzijst","description":"Very simple HTTPS proxy server lib written in Scala with no dependencies.","archived":false,"fork":false,"pushed_at":"2021-09-03T16:01:21.000Z","size":75,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-04T02:14:12.134Z","etag":null,"topics":["http-proxy","https-proxy","scala","tls-proxy"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikvanzijst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-11T12:28:46.000Z","updated_at":"2022-01-27T19:42:58.000Z","dependencies_parsed_at":"2022-09-26T22:11:16.926Z","dependency_job_id":null,"html_url":"https://github.com/erikvanzijst/scala_tlsproxy","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"purl":"pkg:github/erikvanzijst/scala_tlsproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikvanzijst%2Fscala_tlsproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikvanzijst%2Fscala_tlsproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikvanzijst%2Fscala_tlsproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikvanzijst%2Fscala_tlsproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikvanzijst","download_url":"https://codeload.github.com/erikvanzijst/scala_tlsproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikvanzijst%2Fscala_tlsproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["http-proxy","https-proxy","scala","tls-proxy"],"created_at":"2026-01-14T02:26:16.711Z","updated_at":"2026-01-14T02:26:17.343Z","avatar_url":"https://github.com/erikvanzijst.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TLS  (HTTPS) Proxy Server in Scala\n\nVery simple HTTPS proxy server written in Scala 2.12 with no external\ndependencies beyond `scala-logging` and low resource overhead.\n\nCan be used as a library, or as a standalone program.\n\n\n## Installation\n\nAdd as a dependency.\n\nsbt users may add this to their `build.sbt`:\n\n```scala\nlibraryDependencies += \"io.github.erikvanzijst\" % \"scala-tlsproxy_2.12\" % \"0.4.2\"\n```\n\nMaven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.erikvanzijst\u003c/groupId\u003e\n    \u003cartifactId\u003escala-tlsproxy_2.12\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## Usage\n\nInstantiate the proxy:\n\n```scala\nimport io.github.erikvanzijst.scalatlsproxy.TlsProxy\n\nnew TlsProxy(3128).run()\n```\n\nThe `run()` method does not create any threads and runs the entire proxy on\nthe calling thread. It does not return until closed.\n\nTo move it to the background, pass it to a `Thread` or `Executor`:\n\n```scala\nimport io.github.erikvanzijst.scalatlsproxy.TlsProxy\nimport java.util.concurrent.Executors\n\nval executor = Executors.newSingleThreadExecutor()\nexecutor.submit(new TlsProxy(3128))\n```\n\n\n## Caveat emptor\n\nThis only implements the `CONNECT` method and can therefore only proxy HTTPS\nrequests. It does not support unencrypted proxy requests using `GET`.\n\nProxy requests for HTTP (non-TLS) `GET` requests result in an error and the\nconnection getting closed:\n\n```\n23:16:25.375 ERROR i.g.e.s.TlsProxyHandler - /0:0:0:0:0:0:0:1:49603 -\u003e unconnected connection failed: IOException: Malformed request\n```\n\n\n## Robustness (or lack thereof)\n\n* This implementation is totally susceptible to all kinds of [slowloris attacks](https://en.wikipedia.org/wiki/Slowloris_%28computer_security%29)\n* It does not support client authentication\n* Uses only 1 thread and cannot currently scale to multiple cores\n* Does not restrict non-standard upstream ports\n* Undoubtedly riddled with bugs\n\n\n## Publishing\n\nPublishing is done to the Sonatype Central Repository and requires gpg-signed\nartifacts. For this, install gpg and (on Mac) `pin-entry-mac`:\n\n```\n$ brew install gnupg pinentry-mac\n```\n\nAdd the pinentry program to `~/.gnupg/gpg-agent.conf`:\n\n```\npinentry-program /usr/local/bin/pinentry-mac\n```\n\nRestart `gpg-agent`:\n\n```\n$ gpgconf --kill gpg-agent\n```\n\nRun `publishLocalSigned` to ensure signing from `sbt` works (this should pop\nup a dialog to enter the private key's passphrase):\n\n```\n$ sbt publishLocalSigned\n[info] Loading global plugins from /Users/erik/.sbt/1.0/plugins\n[info] Loading settings for project tlsproxy-build from plugins.sbt ...\n[info] Loading project definition from /Users/erik/work/tlsproxy/project\n[info] Loading settings for project tlsproxy from build.sbt ...\n[info] Set current project to tlsproxy (in build file:/Users/erik/work/tlsproxy/)\n[info] Wrote /Users/erik/work/tlsproxy/target/scala-2.12/tlsproxy_2.12-0.1.pom\n[info] :: delivering :: erikvanzijst#tlsproxy_2.12;0.1 :: 0.1 :: release :: Tue Aug 17 22:44:46 CEST 2021\n[info] \tdelivering ivy file to /Users/erik/work/tlsproxy/target/scala-2.12/ivy-0.1.xml\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/jars/tlsproxy_2.12.jar\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/docs/tlsproxy_2.12-javadoc.jar\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/srcs/tlsproxy_2.12-sources.jar\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/poms/tlsproxy_2.12.pom.asc\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/poms/tlsproxy_2.12.pom\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/jars/tlsproxy_2.12.jar.asc\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/srcs/tlsproxy_2.12-sources.jar.asc\n[info] \tpublished tlsproxy_2.12 to /Users/erik/.ivy2/local/erikvanzijst/tlsproxy_2.12/0.1/docs/tlsproxy_2.12-javadoc.jar.asc\n[success] Total time: 1 s, completed Aug 17, 2021 10:44:47 PM\n```\n\nNow publish to Sonatype:\n\n```\n$ sbt publishSigned\n[info] Loading global plugins from /Users/erik/.sbt/1.0/plugins\n[info] Loading settings for project tlsproxy-build from plugins.sbt ...\n[info] Loading project definition from /Users/erik/work/tlsproxy/project\n[info] Loading settings for project tlsproxy from build.sbt ...\n[info] Set current project to scala-tlsproxy (in build file:/Users/erik/work/tlsproxy/)\n[info] Wrote /Users/erik/work/tlsproxy/target/scala-2.12/scala-tlsproxy_2.12-0.1-SNAPSHOT.pom\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] gpg: using \"E96DDAAB16804D86EFA2A08A4539ACC7B26D1005\" as default secret key for signing\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT.jar\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT-sources.jar\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT-javadoc.jar\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT.jar.asc\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT.pom.asc\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT-sources.jar.asc\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT-javadoc.jar.asc\n[info] \tpublished scala-tlsproxy_2.12 to https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/erikvanzijst/scala-tlsproxy_2.12/0.1-SNAPSHOT/scala-tlsproxy_2.12-0.1-SNAPSHOT.pom\n[success] Total time: 9 s, completed Aug 17, 2021 11:29:22 PM\n```\n\nNow log in to https://s01.oss.sonatype.org, click on \"Staging Repositories\",\nselect ours, then click `Close`, provide a short string and hit refresh to\ncheck if the deployment gets promoted successfully.\n\nWhen it closes successfully, hit `Release`. This makes the artifacts publicly\navailable (and they can now be found with the artifact-search).\n\nSonatype has a [video](https://www.youtube.com/watch?v=dXR4pJ_zS-0).\n\nTroubleshooting:\n\n* https://github.com/sbt/sbt-pgp#sbt-pgp\n* https://gist.github.com/danieleggert/b029d44d4a54b328c0bac65d46ba4c65\n* https://www.scala-sbt.org/release/docs/Using-Sonatype.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikvanzijst%2Fscala_tlsproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikvanzijst%2Fscala_tlsproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikvanzijst%2Fscala_tlsproxy/lists"}