diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6bde765 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Digineo GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7109ac0..83be976 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,71 @@ HTTP over SSH ============= -This dynamic HTTP proxy tunnels your HTTP requests through SSH connections using public key authentication. -It is not recommended for production use. +This dynamic HTTP proxy tunnels your HTTP requests through SSH connections +using public key authentication. The intention to develop this program is +the requirement of polling [Prometheus exporters][promexp] through SSH. -The intention to develope this program is the requirement of polling [Prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/) through SSH. +> **It is not recommended for production use, yet.** + +[promexp]: https://prometheus.io/docs/instrumenting/exporters/ ## Syntax http:///// -## Example +## Usage + +After installation (see below), start the proxy on `localhost:8000`: + +```console +$ http-over-ssh -listen 127.0.0.1:8000 +``` + +For a full list of options run `http-over-ssh -help`. + +If you want to fetch http://example.com/index.html via `root@jumphost.tld:22`, +just fetch this URL instead: + + http://localhost:8080/root@jumphost.tld:22/example.com:80/index.html + +For ``, the defaults for username and port are "root" and 22. +The following fetch URL is hence equivalent: + + http://localhost:8080/jumphost.tld/example.com:80/index.html + +For the `` is currently only HTTP allowed. This might +change in the future, but requires a change in the fetch URL syntax. -Your proxy is reachable at `localhost:8000` and you want to fetch http://example.com/index.html via `jumphost.tld:22`. -Then just fetch: +Parsing IPv6 addresses for both `` and `` +is currently buggy as well. - http://localhost:8080/jumphost.tld:22/example.com:80/index.html +Please [open an issue][issues] if you need one those features. +[issues]: https://github.com/digineo/http-over-ssh/issues + + +## Installation + +If you have the Go toolchain installed, a simple + +```console +$ go get github.com/digineo/http-over-ssh +``` + +will place a `http-over-ssh` binary in `$GOPATH/bin/`. + +Alternatively, you may download a pre-built binary from the Github +[release page][releases] and extract the binary into your `$PATH`. + +[releases]: https://github.com/digineo/http-over-ssh/releases ## Next steps - [ ] stability improvements - [ ] clean up idle ssh connections - [ ] support for unix sockets + +## License + +MIT Licence. Copyright 2018, Digineo GmbH