-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoc.go
31 lines (31 loc) · 927 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Package tunnel implements a tunnel to another machine from which we can
// Dial other machines or Listen to remote ports. For now this library won't
// check host keys (it just accepts all) and for simplicity it assumes that
// you are using an ssh-agent to access your ssh keys.
//
// Typical use:
//
// First we create the tunnel
//
// tunnel, err := tunnel.Create(tunnel.Config{
// Hops: []string{
// "[email protected]:22",
// "[email protected]:22",
// },
// })
// ...
//
// Then we connect using the tunnel
//
// conn, err := tunnel.Dial("tcp", "service.example.com:4711")
// ...
//
// If everything went according to plan you now have a tunnel that terminates
// at inside.example.com (since it is the last hop) and connects from there to
// port 4711 on service.example.com
//
// You can also listen on the remote endpoint.
//
// listener, err := tunnel.Listen("tcp", ":80")
// ...
package tunnel