Dify AI Ӧ�ÿ�����Ŀ

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Squid SSRF Proxy 配置模板
  2. # 用于 Dify 的 HTTP 请求代理,防止 SSRF 攻击
  3. # 端口
  4. http_port 3128
  5. # 访问控制
  6. acl SSL_ports port 443
  7. acl Safe_ports port 80
  8. acl Safe_ports port 443
  9. acl Safe_ports port 1025-65535
  10. acl CONNECT method CONNECT
  11. # 拒绝非安全端口
  12. http_access deny !Safe_ports
  13. http_access deny CONNECT !SSL_ports
  14. # 允许 Dify 内部服务访问
  15. acl dify_services src 172.16.0.0/12 192.168.0.0/16 10.0.0.0/8
  16. http_access allow dify_services
  17. # 拒绝其他所有访问
  18. http_access deny all
  19. # 不显示 Squid 版本
  20. httpd_suppress_version_string on
  21. # 日志格式
  22. access_log /var/log/squid/access.log squid
  23. cache_log /var/log/squid/cache.log
  24. # 禁用缓存(仅作为代理使用)
  25. cache deny all
  26. # 连接超时
  27. connect_timeout 30 seconds
  28. read_timeout 60 seconds
  29. request_timeout 60 seconds