From 47fa4d7dad0e62f38aa2e7e119359872c215eae8 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Fri, 9 Apr 2021 12:09:29 +0100 Subject: gitlab-sshd: Support the PROXY protocol --- internal/config/config.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'internal/config/config.go') 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", -- cgit v1.2.1