Lzo adaptive option no longer possible?

After input command in mongosh:
db.servers.updateOne({“name” : “mtSrv”}, {$set: { “lzo_compression” : “adaptive”}})
and reboot server in config file tmp/pritunl no parametr with lzo-comp.

Next commands working:
db.servers.updateOne({“name” : “mtSrv”}, {$set: { “lzo_compression” : true}})
db.servers.updateOne({“name” : “mtSrv”}, {$set: { “lzo_compression” : false}})

Im need type “adaptive” for working VPN client on Mikrotik router.

Setting it to adaptive will leave the option blank in the server configuration pritunl/server/instance.py.

With an enterprise subscription a plugin can be added with the server_config function to change the option.

The code can also be modified at /usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/instance.py then run sudo systemctl restart pritunl.

1 Like

This was done. But I encountered the following problem: in the web interface it is no longer possible to save changes to server settings. This happens after the command:
db.servers.updateOne({“name” : “mtSrv”}, {$set: { “lzo_compression” : “adaptive”}})

Screen bottom i try change name server and press ‘Save’:

Change to True or False do working again.

PS: MongoDB 7.0, Pritunl v1.32.3805.95 19334b

That option was removed and the type filtering that was added in the pritunl-web process will only accept a boolean when saving from the web console. The only way to change it would be to modify the code.

Couldn’t find filtering and rewrite it. But I did it differently:

if not self.server.lzo_compression: and self.server.name == 'mtSrv':
    pass

Now, by turning off LZO via mongosh and having a specific server name, we will get a fully working option for connecting Mikrotik routers and a working web interface for server settings.