As Kodi is called with sudo -u osmc environment variables are not retained and as a result not available in Kodi.
The easiest way I have found to set environment variables like for example no_proxy is to add them
to /etc/environment and then configure sudo to include /etc/environment on every invocation.
You need SSH access to the device
ssh osmc@device
sudo sh -c 'echo "Defaults env_file=/etc/environment" > /etc/sudoers.d/osmc-environment'
echo "no_proxy=nas" >> /etc/environment
systemctl restart mediacenter