mirror of
https://github.com/openwrt/packages.git
synced 2025-07-22 07:39:19 +00:00
HevSocks5Server is a high-performance socks5 server for Unix. More details: https://github.com/heiher/hev-socks5-server Signed-off-by: Ray Wang <r@hev.cc>
35 lines
665 B
Bash
35 lines
665 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
USE_PROCD=1
|
|
START=99
|
|
|
|
CONF="hev-socks5-server"
|
|
PROG="/usr/bin/hev-socks5-server"
|
|
|
|
start_service() {
|
|
config_load "$CONF"
|
|
|
|
local enabled
|
|
config_get_bool enabled "config" "enabled" "0"
|
|
[ "$enabled" -eq "1" ] || return 1
|
|
|
|
local conffile
|
|
config_get conffile "config" "conffile"
|
|
|
|
procd_open_instance "$CONF"
|
|
procd_set_param command "$PROG" "$conffile"
|
|
procd_set_param file "$conffile"
|
|
|
|
procd_set_param limits core="unlimited"
|
|
procd_set_param limits nofile="1000000 1000000"
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_set_param respawn
|
|
|
|
procd_close_instance
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "$CONF"
|
|
}
|