mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
microsocks: run as unprivileged user
Run the daemon as unprivileged user for better security. Trim whitespaces while at it. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
committed by
Tianling Shen
parent
4dc36ae9fd
commit
182db0ac04
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=microsocks
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)?
|
||||
@@ -21,6 +21,7 @@ define Package/microsocks
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
CATEGORY:=Network
|
||||
TITLE:=SOCKS5 TCP/IP only proxy
|
||||
USERID:=microsocks:microsocks
|
||||
endef
|
||||
|
||||
define Package/microsocks/description
|
||||
|
||||
@@ -12,7 +12,7 @@ start_service() {
|
||||
config_get_bool _enabled "config" "enabled" "0"
|
||||
[ "$_enabled" -eq "1" ] || return 1
|
||||
|
||||
local _port
|
||||
local _port
|
||||
local _listenip
|
||||
local _bindaddr
|
||||
local _user
|
||||
@@ -38,6 +38,9 @@ start_service() {
|
||||
[ "$_auth_once" -eq "0" ] || procd_append_param command -1
|
||||
[ "$_quiet" -eq "0" ] || procd_append_param command -q
|
||||
|
||||
procd_set_param user microsocks
|
||||
procd_set_param group microsocks
|
||||
|
||||
procd_set_param respawn
|
||||
procd_set_param stderr 1
|
||||
# TODO: Make it dependable on some verbose/debug config setting?
|
||||
|
||||
Reference in New Issue
Block a user