Skip to content

Commit

Permalink
update readme, add license
Browse files Browse the repository at this point in the history
  • Loading branch information
dmke committed Dec 11, 2018
1 parent 02d2cd4 commit ece2820
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 7 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
59 changes: 52 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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://<proxy-address>/<ssh-address>/<destination-host>/<destination-path>


## 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 `<ssh-address>`, 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 `<destination-host>` 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 `<ssh-address>` and `<destination-host>`
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

0 comments on commit ece2820

Please sign in to comment.