Herbertzz / picgo-plugin-minio

MIT License
53 stars 12 forks source link

域名和端口重定向 #26

Open hu-lielie opened 4 weeks ago

hu-lielie commented 4 weeks ago

能否支持域名和端口都重定向的功能? 国内用户没有公网IP,使用STUN内网穿透运营商服务器,获取动态ipv4和动态端口,然后使用Cloudflare重定向功能近似活的公网IP体验。 实际使用场景: http://域名A ->重定向https://域名B:端口A -> 解析https://运营商动态公网IP:端口A ->STUN内网穿透 家庭路由器端口C->局域网服务器端口D

Herbertzz commented 4 weeks ago

这场景很难在开发环境中搭建,不好测试。

GPT说 添加 followRedirects: true, 可以自动跟踪重定向,你可以尝试下,可用的话,反馈下,加到下一版本中。

helper.js 71 行后面添加 followRedirects: true,, 示例参考:

    minioClient = new Minio.Client({
+     followRedirects: true,
      endPoint: config.endPoint,
      port: parseInt(config.port),
      useSSL: config.useSSL,
      accessKey: config.accessKey,
      secretKey: config.secretKey
    })
Herbertzz commented 4 weeks ago

请注意,自动跟踪重定向可能会导致安全问题,因为重定向的目标 URL 可能不可信。因此,在启用自动跟踪重定向之前,请确保您了解潜在的安全风险。

hu-lielie commented 4 weeks ago

请注意,自动跟踪重定向可能会导致安全问题,因为重定向的目标 URL 可能不可信。因此,在启用自动跟踪重定向之前,请确保您了解潜在的安全风险。

好的我去尝试一下

hu-lielie commented 3 weeks ago

不能用,卡在这里 2024-08-26 22:29:56 [PicGo INFO] Transforming... Current transformer is [path] 2024-08-26 22:29:56 [PicGo INFO] Before upload 2024-08-26 22:29:56 [PicGo INFO] Uploading... Current uploader is [smms]

Herbertzz commented 3 weeks ago

你选的 uploader 不是 minio 按

Chever-John commented 1 week ago

@hu-lielie “上传区” - “选择图床”,选择为 minio