{"id":21083641,"url":"https://github.com/initdc/ssh-proxy-by-caddy-l4","last_synced_at":"2025-03-14T05:09:54.845Z","repository":{"id":110380366,"uuid":"478577471","full_name":"initdc/ssh-proxy-by-caddy-l4","owner":"initdc","description":"Layer-4 proxy server, Powered by Caddy.","archived":false,"fork":false,"pushed_at":"2022-04-08T06:03:57.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"build/sh","last_synced_at":"2025-01-20T23:48:32.075Z","etag":null,"topics":["caddy","layer-4","proxy","ssh"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/initdc/caddy-l4","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/initdc.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":"2022-04-06T13:42:13.000Z","updated_at":"2024-09-16T08:00:36.000Z","dependencies_parsed_at":"2023-05-06T08:01:31.663Z","dependency_job_id":null,"html_url":"https://github.com/initdc/ssh-proxy-by-caddy-l4","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/initdc%2Fssh-proxy-by-caddy-l4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Fssh-proxy-by-caddy-l4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Fssh-proxy-by-caddy-l4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Fssh-proxy-by-caddy-l4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/initdc","download_url":"https://codeload.github.com/initdc/ssh-proxy-by-caddy-l4/tar.gz/refs/heads/build/sh","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526952,"owners_count":20305115,"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":["caddy","layer-4","proxy","ssh"],"created_at":"2024-11-19T20:19:16.402Z","updated_at":"2025-03-14T05:09:54.837Z","avatar_url":"https://github.com/initdc.png","language":"Shell","readme":"# [ssh-proxy-by-caddy-l4](https://github.com/initdc/ssh-proxy-by-caddy-l4)\n\n\u003e Layer 4 proxy server, Powered by Caddy.\n\n## Concept\n\nSolving `git@github.com` network problem in this case.\n\n## Warning\n\n**![DANGER] Private key will send to mirror server, deploy server by yourself**\n\n## Run\n\n`docker run --name caddy-l4 -dp 2201:2201 initdc/caddy-l4:latest`\n\nYou need set private key and port for ssh\n\n```sh\n# ~/.ssh/config\n\nHost github.com\n    Hostname github.com\n    IdentityFile ~/.ssh/id_ed25519_github\n    User git\n\nHost localhost\n    Hostname localhost\n    IdentityFile ~/.ssh/id_ed25519_github\n    Port 2201\n    User git\n\n# ssh.example.com\nHost ssh.example.com\n    Hostname ssh.example.com\n    IdentityFile ~/.ssh/id_ed25519_github\n    User git\n```\n\n## Test\n\n`ssh -T -p 2201 git@localhost`\n\n## Usage\n\n`git clone git@localhost:initdc/Hello_World.git`\n\n## Prepare to build\n\nchange buildx `DRIVER` from `docker` to [ `docker-container` or `kubernetes` ]\n\n```sh\ndocker buildx create --name mycontext1 --driver docker-container --use --bootstrap\n\n# or\ndocker buildx create --name mycontext1 --driver kubernetes --use --bootstrap\n```\n\nrefs:\n\n- https://salesjobinfo.com/multi-arch-container-images-for-docker-and-kubernetes/\n\n- https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md\n\n## Build\n\n1. local\n\n   `docker buildx build -t caddy-l4:amd64 . --load`\n\n   `docker buildx build --platform linux/arm64 -t caddy-l4:arm64 . --load`\n\n   \u003e `-t` for local tag: `name:arch`\n\n2. for pushing\n\n   `docker buildx build --platform linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 -t initdc/caddy-l4:v$(TZ=Asia/Shanghai date +%Y.%m.%d) . --push`\n\n   \u003e `latest` -\u003e `v$(TZ=Asia/Shanghai date +%Y.%m.%d)`\n\n   \u003e replace `initdc` with your docker registry user name.\n\n   \u003e check full list with `docker buildx ls`\n\n## Refs\n\n- https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port\n\n- https://github.com/mholt/caddy-l4\n\n- https://caddyserver.com/docs/modules/layer4\n\n- https://github.com/ghthor/caddy-l4-docker\n\n## License\n\nMPL 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitdc%2Fssh-proxy-by-caddy-l4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finitdc%2Fssh-proxy-by-caddy-l4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitdc%2Fssh-proxy-by-caddy-l4/lists"}