PunyGear

  • 计算机
  • 旅游
  • 3D打印
  • 游戏
  • 生活
每个小齿轮都有推动时代前进的力量。
  1. 首页
  2. 计算机
  3. 正文

OctoPrint设置代理服务器

2024-01-29 991点热度 0人点赞 0条评论

OctoPrint需要升级,没法连接github。需要设置 代理服务器 ,才能获得系统更新。OctoPrint没法直接在系统界面中设置代理服务器。只能在树莓派Linux系统中添加和调整相关脚本。具体方法可以参照以下来设置。

设置代理服务器方法
编辑文件。

sudo nano /etc/systemd/system/octoprint.service

文件内容如下,其中Environment是需要添加的三行内容。

[Unit]
Description=The snappy web interface for your 3D printer
After=network.online.target
Wants=network.online.target

[Service]
Environment="HOST=127.0.0.1"
Environment="PORT=5000"
Type=simple
User=pi
Environment=http_proxy=http://192.168.1.xxx:3128
Environment=https_proxy=http://192.168.1.xxx:3128
Environment=no_proxy=localhost,127.0.0.1
ExecStart=/home/pi/oprint/bin/octoprint serve --host=${HOST} --port=${PORT}

[Install]
WantedBy=multi-user.target

编辑保存后,执行下面命令进行重启。

sudo systemctl daemon-reload
sudo service octoprint restart

OctoPrint重启后,即可通过代理服务器进行更新。

相关

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: OctoPrint
最后更新:2024-09-14

PunyGear

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论

COPYRIGHT © 2024 PunyGear. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang