Skip to content

Commit 3251ed8

Browse files
committed
Add Listen Path as Config Variable
1 parent 83958a8 commit 3251ed8

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type SSHConfigGlobal struct {
2121
LDAP_Server string `yaml:"ldap_server"`
2222
LDAP_Domain string `yaml:"ldap_domain"`
2323
PassPassword bool `yaml:"pass_password"`
24+
ListenPath string `yaml:"listen_path"`
2425
}
2526

2627
type SSHConfigServer struct {

example/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ global:
1414
ldap_domain: "ad.domain.local"
1515
## Pass through LDAP password to host we are jumping to for auth?
1616
pass_password: true
17+
## Listen path for setting up the TCP listener.
18+
## We don't support droping priviledges, so should be greater than 1024,
19+
## so the service can be run as a non-root user.
20+
## You can use iptables NATing to redirect users from port 22.
21+
listen_path: "0.0.0.0:2222"
1722
servers:
1823
## An array of servers that clients can jump to.
1924
vdev1.ad.domain.local:

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func main() {
4242
panic(err)
4343
}
4444

45-
s.ListenAndServe(":2222")
45+
s.ListenAndServe(config.Global.ListenPath)
4646
}
4747

4848
func GetMOTD() (string) {

0 commit comments

Comments
 (0)