|
|
适用于haos系统 coer版没测试
# 编辑/etc/profile文件(按i进入编辑模式)
nano /etc/profile
若为socks5
# SOCKS5代理环境变量
export ALL_PROXY=socks5://192.168.167.245:7893
export HTTP_PROXY=socks5://192.168.167.245:7893
export HTTPS_PROXY=socks5://192.168.167.245:7893
# 无需代理的地址(本地局域网、HA自身地址等)
export NO_PROXY=localhost,127.0.0.1,192.168.167.0/24,homeassistant.local,homeassistant
若为HTTP/HTTPS代理
# HTTP/HTTPS代理环境变量
export HTTP_PROXY=http://192.168.167.245:7890
export HTTPS_PROXY=http://192.168.167.245:7890
export NO_PROXY=localhost,127.0.0.1,192.168.167.0/24,homeassistant.local,homeassistant
按 Ctrl+O 保存文件,按 Enter 确认文件名,再按 Ctrl+X 退出编辑模式。
执行以下命令让配置立即生效(无需重启HA)
source /etc/profile |
|