Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG:189pc和189的driver中tls_insecure_skip_verify配置未生效 #4355

Closed
4 tasks done
XYUU opened this issue May 9, 2023 · 2 comments
Closed
4 tasks done

BUG:189pc和189的driver中tls_insecure_skip_verify配置未生效 #4355

XYUU opened this issue May 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@XYUU
Copy link
Contributor

XYUU commented May 9, 2023

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure it's due to alist and not something else(such as Dependencies or Operational).
  • I'm sure I'm using the latest version

Alist Version / Alist 版本

v3.16.3

Driver used / 使用的存储驱动

189pc/189

Describe the bug / 问题描述

data目录下的配置文件config.json中
"tls_insecure_skip_verify": true
但该配置在189pc和189的驱动中并未生效,代码中直接是

// 初始化请求客户端
if y.client == nil {
	y.client = base.NewRestyClient().SetHeaders(map[string]string{
		"Accept":  "application/json;charset=UTF-8",
		"Referer": WEB_URL,
	})
}
if y.putClient == nil {
	y.putClient = base.NewRestyClient().SetTimeout(120 * time.Second)
}

以及

d.client = resty.New().
	SetTimeout(base.DefaultTimeout).
	SetRetryCount(3).
	SetHeader("Referer", "https://cloud.189.cn/").
	SetHeader("User-Agent", base.UserAgent)

为什么没有复用

req := base.RestyClient.R()

呢?是否是因为这种场景不太容易复用基类client实例?有哪些考虑?

Reproduction / 复现链接

http://192.168.1.1:5244/@manage/storages/add

Logs / 日志

No response

@XYUU XYUU added the bug Something isn't working label May 9, 2023
@foxxorcat
Copy link
Member

没记错的话,好像是189会验证cookie,复用的话会导致多用户登录时出错

@XYUU
Copy link
Contributor Author

XYUU commented May 14, 2023

我测试了一下,发现没改干净,我这边重新改了一遍,亲测可用了。
#4386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants