@@ -251,7 +251,9 @@ func (c *CertificatesController) saveClientConfig(keysPath string, name string)
251251 cfg .PersistKey = ovClientConfig .PersistKey
252252 cfg .RemoteCertTLS = ovClientConfig .RemoteCertTLS
253253 cfg .RedirectGateway = ovClientConfig .RedirectGateway
254- // cfg.Proto = ovClientConfig.Proto // this will be set from server config
254+ cfg .Proto = ovClientConfig .Proto // this will be set from client instead of server config
255+ cfg .Auth = ovClientConfig .Auth // this will be set from client instead of server config
256+ cfg .Cipher = ovClientConfig .Cipher // this will be set from client instead of server config
255257 cfg .Device = ovClientConfig .Device
256258 cfg .AuthNoCache = ovClientConfig .AuthNoCache
257259 cfg .TlsClient = ovClientConfig .TlsClient
@@ -288,9 +290,9 @@ func (c *CertificatesController) saveClientConfig(keysPath string, name string)
288290 serverConfig := models.OVConfig {Profile : "default" }
289291 _ = serverConfig .Read ("Profile" )
290292 cfg .Port = serverConfig .Port
291- cfg .Proto = serverConfig .Proto
292- cfg .Auth = serverConfig .Auth
293- cfg .Cipher = serverConfig .Cipher
293+ // cfg.Proto = serverConfig.Proto //Now getting it from client config
294+ // cfg.Auth = serverConfig.Auth //Now getting it from client config
295+ // cfg.Cipher = serverConfig.Cipher //Now getting it from client config
294296
295297 destPath := filepath .Join (state .GlobalCfg .OVConfigPath , "clients" , name + ".ovpn" )
296298 if err := SaveToFile (filepath .Join (c .ConfigDir , "openvpn-client-config.tpl" ), cfg , destPath ); err != nil {
0 commit comments