@@ -209,7 +209,7 @@ func (c *ConnectClient) run(mobileDependency MobileDependency, runningChan chan
209209		localPeerState  :=  peer.LocalPeerState {
210210			IP :              loginResp .GetPeerConfig ().GetAddress (),
211211			PubKey :          myPrivateKey .PublicKey ().String (),
212- 			KernelInterface : device . WireGuardModuleIsLoaded (), 
212+ 			KernelInterface : false ,  // do not load kernel interface by default, as it could brake amneziaWG 
213213			FQDN :            loginResp .GetPeerConfig ().GetFqdn (),
214214		}
215215		c .statusRecorder .UpdateLocalPeerState (localPeerState )
@@ -446,22 +446,16 @@ func createEngineConfig(key wgtypes.Key, config *profilemanager.Config, peerConf
446446		LazyConnectionEnabled : config .LazyConnectionEnabled ,
447447
448448		MTU : selectMTU (config .MTU , peerConfig .Mtu ),
449- 		AmneziaConfig : amneziawg.AmneziaConfig {
450- 			Jc :   * peerConfig .AmneziaConfig .Jc ,
451- 			Jmin : * peerConfig .AmneziaConfig .Jmin ,
452- 			Jmax : * peerConfig .AmneziaConfig .Jmax ,
453- 			S1 :   * peerConfig .AmneziaConfig .S1 ,
454- 			S2 :   * peerConfig .AmneziaConfig .S2 ,
455- 			H1 :   * peerConfig .AmneziaConfig .H1 ,
456- 			H2 :   * peerConfig .AmneziaConfig .H2 ,
457- 			H3 :   * peerConfig .AmneziaConfig .H3 ,
458- 			H4 :   * peerConfig .AmneziaConfig .H4 ,
459- 			I1 :   * peerConfig .AmneziaConfig .I1 ,
460- 			I2 :   * peerConfig .AmneziaConfig .I2 ,
461- 			I3 :   * peerConfig .AmneziaConfig .I3 ,
462- 			I4 :   * peerConfig .AmneziaConfig .I4 ,
463- 			I5 :   * peerConfig .AmneziaConfig .I5 ,
464- 		},
449+ 	}
450+ 
451+ 	if  peerConfig .AmneziaConfig  !=  nil  {
452+ 
453+ 		engineConf .AmneziaConfig  =  amneziawg .FromProtobuf (peerConfig .AmneziaConfig )
454+ 		log .Infof ("Init amneziaWG config from peer: %v" , engineConf .AmneziaConfig )
455+ 	} else  {
456+ 
457+ 		engineConf .AmneziaConfig  =  amneziawg.AmneziaConfig {}
458+ 		log .Infof ("Init empty amneziaWG config" )
465459	}
466460
467461	if  config .PreSharedKey  !=  ""  {
0 commit comments