mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Goal of this commit is to add some missing features when the Kubernetes API is accessed through a SOCKS5 proxy. That's for example the case when port-forwarding is used (`kubectl port-forward`) or when exec'ing inside a container (`kubectl exec`), with this commit it'll now be possible to use both. Signed-off-by: Romain Aviolat <romain.aviolat@kudelskisecurity.com> Signed-off-by: Romain Jufer <romain.jufer@kudelskisecurity.com>
46 lines
1.0 KiB
Markdown
46 lines
1.0 KiB
Markdown
go-socks5 [](https://travis-ci.org/armon/go-socks5)
|
|
=========
|
|
|
|
Provides the `socks5` package that implements a [SOCKS5 server](http://en.wikipedia.org/wiki/SOCKS).
|
|
SOCKS (Secure Sockets) is used to route traffic between a client and server through
|
|
an intermediate proxy layer. This can be used to bypass firewalls or NATs.
|
|
|
|
Feature
|
|
=======
|
|
|
|
The package has the following features:
|
|
* "No Auth" mode
|
|
* User/Password authentication
|
|
* Support for the CONNECT command
|
|
* Rules to do granular filtering of commands
|
|
* Custom DNS resolution
|
|
* Unit tests
|
|
|
|
TODO
|
|
====
|
|
|
|
The package still needs the following:
|
|
* Support for the BIND command
|
|
* Support for the ASSOCIATE command
|
|
|
|
|
|
Example
|
|
=======
|
|
|
|
Below is a simple example of usage
|
|
|
|
```go
|
|
// Create a SOCKS5 server
|
|
conf := &socks5.Config{}
|
|
server, err := socks5.New(conf)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
// Create SOCKS5 proxy on localhost port 8000
|
|
if err := server.ListenAndServe("tcp", "127.0.0.1:8000"); err != nil {
|
|
panic(err)
|
|
}
|
|
```
|
|
|