{"id":18563154,"url":"https://github.com/compulim/uncork","last_synced_at":"2025-04-10T03:32:40.766Z","repository":{"id":57385863,"uuid":"84549404","full_name":"compulim/uncork","owner":"compulim","description":"SSH-over-HTTPS proxy that works like Unix \"corkscrew\"","archived":false,"fork":false,"pushed_at":"2017-03-10T18:08:26.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T23:19:11.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compulim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-10T10:40:09.000Z","updated_at":"2024-01-13T23:56:28.000Z","dependencies_parsed_at":"2022-09-14T20:51:33.233Z","dependency_job_id":null,"html_url":"https://github.com/compulim/uncork","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Funcork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Funcork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Funcork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compulim%2Funcork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compulim","download_url":"https://codeload.github.com/compulim/uncork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223424468,"owners_count":17142744,"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":[],"created_at":"2024-11-06T22:11:56.158Z","updated_at":"2024-11-06T22:11:56.231Z","avatar_url":"https://github.com/compulim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uncork\n\n[![npm version](https://badge.fury.io/js/uncork.svg)](https://npmjs.com/package/uncork) [![npm downloads](https://img.shields.io/npm/dm/uncork.svg)](https://npmjs.com/package/uncork)\n\nSSH-over-HTTPS proxy that works like Unix [`corkscrew`](http://agroman.net/corkscrew/).\n\n# Install\n\nRun `npm install uncork -g` to install `uncork` globally.\n\n# Run\n\n\u003e Before running `uncork`, make sure your proxy is set in environment variable as either `HTTPS_PROXY` or `HTTP_PROXY`.\n\nRun `uncork 22 ssh.github.com:443` to start `uncork` server on port 22 and forward to [ssh.github.com:443](ssh://ssh.github.com:443).\n\n```\nSSH-over-HTTPS proxy 1.0.0\n\n- Listening on port 22\n- Will connect to HTTPS proxy at 127.0.0.1:8888\n- Will tunnel traffic to destination at ssh.github.com:443\n```\n\nIf your proxy server requires authentication, you can run `uncork 22 ssh.github.com:443 johndoe P@ssw0rd` to start `uncork` server with BASIC authentication.\n\n## Options via environment variables\n\nYou can also set options thru environment variables listed below.\n\n| Environment variable    | Description                             | Default              |\n| ----------------------- | --------------------------------------- | -------------------- |\n| `uncork_destination`    | Destination hostname and port           | `ssh.github.com:443` |\n| `uncork_port`           | Port number to listen to                | `22`                 |\n| `uncork_proxy_username` | Username for proxy BASIC authentication |                      |\n| `uncork_proxy_password` | Password for proxy BASIC authentication |                      |\n\n# How we use `uncork`\n\nAt our customer site, their Windows boxes are shared and locked behind firewall with HTTPS proxy. We want to use Git client to read/write to GitHub via SSH. We prefer SSH because we can use deploy keys to limit access to our repositories.\n\nOur requirements:\n\n* Use GitHub deploy keys, which is SSH only\n* Work thru their HTTPS proxy\n  * Only allow traffic to external servers on port 443\n  * Requires authentication, supports both BASIC and NTLM\n* XCOPY deployment\n  * Do not require administrative privileges\n  * Minimal footprint\n\nFortunately, GitHub has a SSH server setup on port 443 instead of 22, described in this [article](https://help.github.com/articles/using-ssh-over-the-https-port/).\n\nAssume our repository is setup with SSH deploy keys generated by `puttygen`.\n\nOn Windows box:\n\n* Install [PuTTY suite](http://www.chiark.greenend.org.uk/~sgtatham/putty/), specifically `plink.exe` and `pageant.exe`\n* Set environment variable `GIT_SSH` and point to `plink.exe`\n  * Run `SETX GIT_SSH \u003cpath to plink.exe\u003e`, this will set a per-user permanent environment variable\n* Load the deploy key\n  * Run `pageant.exe`\n* Install and run `uncork`\n  * Run `npm install uncork -g`\n  * Run `uncork 22 ssh.github.com:443`\n* Clone the repository\n  * Run `git clone git@localhost/org/reponame.git`\n\n\u003e Although some steps mentioned above requires administrative privileges, we actually build a ZIP file to contain all the installed components mentioned.\n\n# Contribution\n\nLike us? [Star](https://github.com/compulim/uncork/stargazers) us.\n\nFound a bug? [File](https://github.com/compulim/uncork/issues) us an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Funcork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompulim%2Funcork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompulim%2Funcork/lists"}