13 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
6c73b18d7f
shadowsocks: When editing configuration, don't re-enable
If the app is disabled and configuration is edited, don't start the daemon.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
2020-03-22 20:09:13 +00:00
Sunil Mohan Adapa
79a9948290
shadowsocks: Fix incorrect setting of state directory
Commit 50e5608331330b37c0b9cce846e34ccc193d1b0d incorrectly sets the
StateDirectory without setting DynamicUser. Buster's shadowsocks will then
create directory /var/lib/shadowsocks-libev/freedombox/ and refuse to delete it
in later versions when DynamicUser=yes needs it to be a symlink.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
2020-03-22 20:08:45 +00:00
Sunil Mohan Adapa
744308a501
shadowsocks: Change default configuration
- Reduce password length to encourage users to use the auto-generated one
instead of setting a new one.

- Don't set mode to tcp_and_udp: 1) upstream default to TCP only, leave the
decision to upstream. 2) firewalld service file only allows TCP. Without editing
the firewalld configuration, this change is incorrect.

- Don't set timeout. This values matches with the upstream default.. Leave this
to upstream.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
2020-03-22 20:07:30 +00:00
Nektarios Katakis
af713d23fd
shadowshocks: Fix setting configuration on Buster
- Ensure that /var/lib/private/shadowsocks-libev/freedombox always exists. This
fixes not being able to save configuration after setup on fresh Buster installs.

- Merge migration path from version 1 to 2 into setup process in an idempotent
way.

- Always creating an initial configuration file so that daemon starts soon after
install. Set a default random password. Localhost as default server.

Closes: #1792

Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
[sunil: Minor indentation, update commit message]
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-03-22 20:07:12 +00:00
Joseph Nuthalapati
50e5608331
shadowsocks: Move user settings to state directory
Fixes #1775

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-03-09 18:55:11 -04:00
Joseph Nuthalapati
976668d89b
shadowsocks: Fix shadowsocks not able to start
Shadowsocks is unable to read its own configuration file because it
doesn't have read permissions to the file.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[jvalleroy: Add comment about security concerns]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-24 18:42:30 -05:00
Sunil Mohan Adapa
eada506b23
actions/*: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:39:36 +02:00
Alice Kile
eb83e00011
fix formatting issues
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:35 -05:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Sunil Mohan Adapa
c61d61ec66
shadowsocks: Restart service instead of reload
- The service file does not support reloading

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-29 17:53:25 +05:30
Sunil Mohan Adapa
aeae8c55a4
shadowsocks: Read configuration as root, update description
- Also use the service helper to start stop shadowsocks service.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-29 17:53:17 +05:30
Sunil Mohan Adapa
9cfcc08434
shadowsocks: Create a config with stricter permissions
So that the server password is not read by other users on the system.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-29 17:53:09 +05:30
James Valleroy
6bf4eb1483
shadowsocks: Add shadowsocks client with socks5 proxy
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-11-29 17:47:05 +05:30