summaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2021-04-09 12:09:29 +0100
committerNick Thomas <nick@gitlab.com>2021-04-09 12:22:40 +0100
commit47fa4d7dad0e62f38aa2e7e119359872c215eae8 (patch)
tree5c57eb0322b7f063059027ce4bcec135aca1ea92 /internal/config/config.go
parent88f94337bb87c0cc51f6badf7a4ff1826f25efaa (diff)
downloadgitlab-shell-491-support-proxy-protocol.tar.gz
gitlab-sshd: Support the PROXY protocol491-support-proxy-protocol
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 36f8625..2709277 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -18,6 +18,7 @@ const (
type ServerConfig struct {
Listen string `yaml:"listen,omitempty"`
+ ProxyProtocol bool `yaml:"proxy_protocol,omitempty"`
WebListen string `yaml:"web_listen,omitempty"`
ConcurrentSessionsLimit int64 `yaml:"concurrent_sessions_limit,omitempty"`
HostKeyFiles []string `yaml:"host_key_files,omitempty"`
@@ -52,15 +53,15 @@ type Config struct {
// The defaults to apply before parsing the config file(s).
var (
DefaultConfig = Config{
- LogFile: "gitlab-shell.log",
+ LogFile: "gitlab-shell.log",
LogFormat: "text",
- Server: DefaultServerConfig,
- User: "git",
+ Server: DefaultServerConfig,
+ User: "git",
}
DefaultServerConfig = ServerConfig{
- Listen: "[::]:22",
- WebListen: "localhost:9122",
+ Listen: "[::]:22",
+ WebListen: "localhost:9122",
ConcurrentSessionsLimit: 10,
HostKeyFiles: []string{
"/run/secrets/ssh-hostkeys/ssh_host_rsa_key",