-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Snap][Service]Service in snap can not work, because there is no default path of config file #621
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
You can use arguments as a temporary solution. Ref #617. shadowsocks-rust.ssserver -s "0.0.0.0:8388" -m "aes-256-gcm" -k "********" |
Thank you! |
Unfortunately, I don't have a build environment for snap. If you keep this issue open, other collaborators may be able to fix it. |
Ok, Thank you! |
I recommend to set the default path to |
shadowsocks-libev default path is |
Why snap's daemon couldn't start with command line arguments? |
The snap default only allow application to access path under |
Same problem here. It seems snap version can't automatically read configure file via a default or designated path as in Shadowsocks-libev. Neither can it pass parameters to its daemon service when invoking systemctl. Both of these methods are not currently working in the snap store version. |
It should already supported in the latest version: shadowsocks-rust/bin/common/config.rs Lines 7 to 44 in 1eff9b1
ref #688 |
The issue still exists with channels like stable and edge, but I can't see the snapcraft build logs. If edge is the latest image, then this issue may still be unresolved. kallydev@ubuntu:~$ sudo snap install shadowsocks-rust --edge
shadowsocks-rust (edge) v1.12.2.r12.g1eff9b1 from DuckSoft installed
kallydev@ubuntu:~$ shadowsocks-rust.ssserver --version
shadowsocks 1.12.3
kallydev@ubuntu:~$ cat .config/shadowsocks-rust/config.json
{
"server": "127.0.0.1",
"server_port": 8388,
"password": "password",
"method": "aes-256-gcm"
}
kallydev@ubuntu:~$ shadowsocks-rust.ssserver
missing proxy servers, consider specifying it by --server-addr, --encrypt-method, --password command line option, or configuration file, check more details in https://shadowsocks.org/en/config/quick-guide.html
USAGE:
ssserver [FLAGS] [OPTIONS] |
Please try again with the global configuration path |
This should be because the image does not have permission to read these configuration files. kallydev@ubuntu:~$ shadowsocks-rust.ssserver -c .config/shadowsocks-rust/config.json
loading config ".config/shadowsocks-rust/config.json", error while reading file, Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
kallydev@ubuntu:~$ shadowsocks-rust.ssserver -c /etc/
Display all 230 possibilities? (y or n)
kallydev@ubuntu:~$ shadowsocks-rust.ssserver -c /etc/shadowsocks-rust/config.json
loading config "/etc/shadowsocks-rust/config.json", error while reading file, Os { code: 2, kind: NotFound, message: "No such file or directory" }
Ref https://snapcraft.io/docs/home-interface, only "non-hidden files" can be accessed.
|
It's OK. |
We can completely resolve the So, I just reviewed qv2ray's solution, then replaced kallydev@ubuntu:~$ shadowsocks-rust.ssserver -c ./snap/shadowsocks-rust/common/.config/shadowsocks-rust/config.json
2021-11-25T18:30:58.789058481-08:00 INFO shadowsocks server 1.12.3 build 2021-11-25T16:55:04.297088322+00:00
2021-11-25T18:30:58.790422140-08:00 INFO shadowsocks tcp server listening on 127.0.0.1:8388, inbound address 127.0.0.1:8388 Of course, I think |
there is no default path of config file,
therefore i can not use
snap start shadowsocks-rust.ssserver-daemon
debian 10,
snap,
shadowsocks-rust edge v1.11.2.r34.gf717984
The text was updated successfully, but these errors were encountered: