You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,10 @@ It is designed with security in mind, so there are secure defaults and an additi
11
11
12
12
The allowlist is configured for each HTTP method separately using the Go regexp syntax, allowing fine-grained control over the allowed HTTP methods.
13
13
14
-
The source code is available on [GitHub: wollomatic/socket-proxy](https://github.com/wollomatic/socket-proxy).
14
+
The source code is available on [GitHub: wollomatic/socket-proxy](https://github.com/wollomatic/socket-proxy)
15
+
16
+
> [!NOTE]
17
+
> Starting with version 1.6.0, the socket-proxy container image is also available on GHCR.
15
18
16
19
## Getting Started
17
20
@@ -23,14 +26,17 @@ You should know what you are doing. Never expose socket-proxy to a public networ
23
26
24
27
### Installing
25
28
26
-
The container image is available on [Docker Hub: wollomatic/socket-proxy](https://hub.docker.com/r/wollomatic/socket-proxy).
29
+
The container image is available on [Docker Hub (wollomatic/socket-proxy)](https://hub.docker.com/r/wollomatic/socket-proxy)
30
+
and on the [GitHub Container Registry (ghcr.io/wollomatic/socket-proxy)](https://hub.docker.com/r/wollomatic/socket-proxy).
31
+
27
32
28
-
To pin one specific version, use the version tag (for example, `wollomatic/socket-proxy:1.0.1`).
29
-
To always use the most recent version, use the `1` tag (`wollomatic/socket-proxy:1`). This tag will be valid as long as there is no breaking change in the deployment.
33
+
To pin one specific version, use the version tag (for example, `wollomatic/socket-proxy:1.6.0` or `ghcr.io/wollomatic/socket-proxy:1.6.0`).
34
+
To always use the most recent version, use the `1` tag (`wollomatic/socket-proxy:1` or `ghcr.io/wollomatic/socket-proxy:1`). This tag will be valid as long as there is no breaking change in the deployment.
30
35
31
36
There may be an additional docker image with the `testing`-tag. This image is only for testing. Likely, documentation for the `testing` image could only be found in the GitHub commit messages. It is not recommended to use the `testing` image in production.
32
37
33
38
Every socket-proxy release image is signed with Cosign. The public key is available on [GitHub: wollomatic/socket-proxy/main/cosign.pub](https://raw.githubusercontent.com/wollomatic/socket-proxy/main/cosign.pub) and [https://wollomatic.de/socket-proxy/cosign.pub](https://wollomatic.de/socket-proxy/cosign.pub). For more information, please refer to the [Security Policy](https://github.com/wollomatic/socket-proxy/blob/main/SECURITY.md).
39
+
As of version 1.6, all multi-arch images are signed.
34
40
35
41
### Allowing access
36
42
@@ -44,9 +50,6 @@ Socket-proxy listens per default only on `127.0.0.1`. Depending on what you need
44
50
45
51
#### Using a unix socket instead of a TCP listener
46
52
47
-
> [!CAUTION]
48
-
> This is a new feature introduced in version 1.5.0. If you experience any issues, please feel free to open an GitHub issue.
49
-
50
53
If you want to proxy/filter the unix socket to a new unix socket instead to a TCP listener,
51
54
you need to set the `-proxysocketendpoint` parameter or the `SP_PROXYSOCKETENDPOINT` env variable to the socket path of the new unix socket.
52
55
This will also disable the TCP listener.
@@ -202,6 +205,8 @@ socket-proxy can be configured via command line parameters or via environment va
202
205
203
206
1.5 - allow unix socket as proxied/filtered endpoint
204
207
208
+
1.6 - Cosign: sign a multi-arch container image AND all referenced, discrete images. Image is also available on GHCR.
209
+
205
210
## License
206
211
207
212
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
gostartSocketWatchdog(cfg.SocketPath, int64(cfg.WatchdogInterval), cfg.StopOnWatchdog, internalQuit)// #nosec G115 - we validated the integer size in config.go
ctx, cancel:=context.WithTimeout(context.Background(), time.Duration(int64(cfg.ShutdownGraceTime))*time.Second)// #nosec G115 - we validated the integer size in config.go
flag.UintVar(&proxyPort, "proxyport", defaultProxyPort, "tcp port to listen on")
141
142
flag.UintVar(&cfg.ShutdownGraceTime, "shutdowngracetime", defaultShutdownGraceTime, "maximum time in seconds to wait for the server to shut down gracefully")
143
+
ifcfg.ShutdownGraceTime>math.MaxInt64 {
144
+
returnnil, fmt.Errorf("shutdowngracetime has to be smaller than %i", math.MaxInt64) // this maximum value has no practical significance
145
+
}
142
146
flag.StringVar(&cfg.SocketPath, "socketpath", defaultSocketPath, "unix socket path to connect to")
143
147
flag.BoolVar(&cfg.StopOnWatchdog, "stoponwatchdog", defaultStopOnWatchdog, "stop the program when the socket gets unavailable (otherwise log only)")
144
148
flag.UintVar(&cfg.WatchdogInterval, "watchdoginterval", defaultWatchdogInterval, "watchdog interval in seconds (0 to disable)")
149
+
ifcfg.WatchdogInterval>math.MaxInt64 {
150
+
returnnil, fmt.Errorf("watchdoginterval has to be smaller than %i", math.MaxInt64) // this maximum value has no practical significance
151
+
}
145
152
flag.StringVar(&cfg.ProxySocketEndpoint, "proxysocketendpoint", defaultProxySocketEndpoint, "unix socket endpoint (if set, used instead of the TCP listener)")
146
153
flag.UintVar(&endpointFileMode, "proxysocketendpointfilemode", defaultProxySocketEndpointFileMode, "set the file mode of the unix socket endpoint")
0 commit comments