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

插件是否也会遵循 --user 选项所指定的用户? #1105

Closed
pexcn opened this issue Feb 2, 2023 · 1 comment
Closed

插件是否也会遵循 --user 选项所指定的用户? #1105

pexcn opened this issue Feb 2, 2023 · 1 comment

Comments

@pexcn
Copy link
Contributor

pexcn commented Feb 2, 2023

当我使用 qtun 插件时:

# 日志显示的证书目录 /root/.acme.sh/example.com
ssservice local --config ./local.json

# 日志显示的证书目录 /root/.acme.sh/example.com
ssservice local --user nobody --config ./local.json

当我使用 xray-plugin 插件时:

# 日志显示的证书目录 /root/.acme.sh/example.com
ssservice local --config ./local.json

# 日志显示的证书目录 //.acme.sh/example.com
ssservice local --user nobody --config ./local.json

请问为什么在使用 qtun 插件的时候,即使我指定了 --user nobody, 它读取到的证书目录也是在 /root 下?

@zonyitoo
Copy link
Collaborator

zonyitoo commented Feb 2, 2023

let mut cmd = Command::new(&plugin.plugin);
cmd.env("SS_REMOTE_HOST", remote.host())
.env("SS_REMOTE_PORT", remote.port().to_string())
.env("SS_LOCAL_HOST", local.ip().to_string())
.env("SS_LOCAL_PORT", local.port().to_string())
.stdin(Stdio::null())
.kill_on_drop(true);

Plugin starts without changing the uid, so the process should run with the user specified by --user.

As for the problem about the path of cert, you should open an issue to qtun, there is nothing related to shadowsocks-rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants