qtun icon indicating copy to clipboard operation
qtun copied to clipboard

feat: 指定 cert 和 key, 而不是自动获取

Open iugo opened this issue 3 years ago • 2 comments

支持自定义的难度不高, 但适用性可能更广:

两种可选方式:

  1. 从环境变量中获取 path.
  2. 从参数中获取 path. 比如 --plugin-opts "host=example.com;keypath=;certpath="

我在实际使用中, 使用同一个 非 root 帐号, 出现 Error: Permission denied (os error 13).

将 key 文件该为 rw 还是不行.


代码中有写会从环境变量中获取插件参数, 除了 acme_host 还支持 cert 和 key:

https://github.com/shadowsocks/qtun/blob/b7d0ce5d4533ebd908a11c3b0cb92ea960a3800c/src/server.rs#L70-L84

我尝试在 插件参数中 写 cert=/certpath, 没有起到作用. 可能是因为这个参数会在 https://github.com/shadowsocks/qtun/blob/b7d0ce5d4533ebd908a11c3b0cb92ea960a3800c/src/server.rs#L87 处被覆盖.

也许 https://github.com/shadowsocks/qtun/pull/8 有所帮助.

iugo avatar Mar 26 '22 04:03 iugo

Don't specify acme host, if you want to set TLS cert keys and certs manually.

madeye avatar Mar 26 '22 15:03 madeye

Don't specify acme host, if you want to set TLS cert keys and certs manually.

Only cert and key is available. But still got Error: Permission denied (os error 13).

After using the root account, it works fine.

iugo avatar Apr 13 '22 09:04 iugo