# setting proxy



## Sparkee (Oct 20, 2022)

[_Mod: Split off from a 13(!) year old thread; Thread setting-proxy.1801_]

How can I make this work with sudo(8)?

I've tried adding `setenv http_proxy http://proxy-server.com:3128` to /etc/profile which will make it work with the root user, but won't work using sudo(8). `sudo -E` is also not an option:


```
% sudo -E pkg audit -F
sudo: sorry, you are not allowed to preserve the environment
```


----------



## W.hâ/t (Oct 20, 2022)

'setenv' is for csh, it doesn't work in /etc/profile


----------

