Skip to content

Commit

Permalink
Add Listen Path as Config Variable
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacarpet committed Jan 30, 2017
1 parent 83958a8 commit 3251ed8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type SSHConfigGlobal struct {
LDAP_Server string `yaml:"ldap_server"`
LDAP_Domain string `yaml:"ldap_domain"`
PassPassword bool `yaml:"pass_password"`
ListenPath string `yaml:"listen_path"`
}

type SSHConfigServer struct {
Expand Down
5 changes: 5 additions & 0 deletions example/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ global:
ldap_domain: "ad.domain.local"
## Pass through LDAP password to host we are jumping to for auth?
pass_password: true
## Listen path for setting up the TCP listener.
## We don't support droping priviledges, so should be greater than 1024,
## so the service can be run as a non-root user.
## You can use iptables NATing to redirect users from port 22.
listen_path: "0.0.0.0:2222"
servers:
## An array of servers that clients can jump to.
vdev1.ad.domain.local:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
panic(err)
}

s.ListenAndServe(":2222")
s.ListenAndServe(config.Global.ListenPath)
}

func GetMOTD() (string) {
Expand Down

0 comments on commit 3251ed8

Please sign in to comment.