Skip to content

Commit

Permalink
fix(vpn): ensure client config has the correct proto
Browse files Browse the repository at this point in the history
  • Loading branch information
cad committed Sep 1, 2017
1 parent 3c59a74 commit 25a890d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bindata/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion template/client.ovpn.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

client
dev tun
proto udp
proto {{ .Proto }}
remote {{ .Hostname }} {{ .Port }}
resolv-retry infinite
ns-cert-type server
Expand Down
2 changes: 2 additions & 0 deletions vpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,15 @@ func DumpsClientConfig(username string) (string, error) {
Key string
Cert string
NoGW bool
Proto string
}{
Hostname: server.Hostname,
Port: server.Port,
CA: server.CACert,
Key: user.Key,
Cert: user.Cert,
NoGW: user.NoGW,
Proto: server.GetProto(),
}
data, err := bindata.Asset("template/client.ovpn.tmpl")
if err != nil {
Expand Down

0 comments on commit 25a890d

Please sign in to comment.