mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
25.7.2 patch for shadowsocks (#4913)
This commit is contained in:
@@ -41,7 +41,7 @@ function shadowsocks_services()
|
||||
'stop' => array('shadowsocks stop'),
|
||||
),
|
||||
'name' => 'shadowsocks',
|
||||
'pidfile' => '/var/run/shadowsocks-libev.pid'
|
||||
'pidfile' => '/var/run/ssserver_rust.pid'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ function shadowsocks_services()
|
||||
'stop' => array('shadowsockslocal stop'),
|
||||
),
|
||||
'name' => 'shadowsockslocal',
|
||||
'pidfile' => '/var/run/ss-local.pid'
|
||||
'pidfile' => '/var/run/sslocal_rust.pid'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: ss-local
|
||||
# REQUIRE: LOGIN cleanvar
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable shadowsocks-libev:
|
||||
# ss_local_enable (bool): Set to "NO" by default.
|
||||
# Set to "YES" to enable ss-local.
|
||||
# ss_local_config (path): Shadowsocks config file.
|
||||
# Defaults to "/usr/local/etc/shadowsocks-libev/local.json"
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ss_local"
|
||||
rcvar=ss_local_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${ss_local_enable:="NO"}
|
||||
: ${ss_local_config="/usr/local/etc/shadowsocks-libev/local.json"}
|
||||
|
||||
command="/usr/local/bin/ss-local"
|
||||
pidfile="/var/run/ss-local.pid"
|
||||
required_files="${ss_local_config}"
|
||||
|
||||
command_args="-f $pidfile -c $ss_local_config"
|
||||
|
||||
run_rc_command "$1"
|
||||
@@ -1,47 +1,24 @@
|
||||
[start]
|
||||
command:/usr/local/etc/rc.d/shadowsocks_libev start
|
||||
command:/usr/local/etc/rc.d/ssserver-rust start
|
||||
parameters:
|
||||
type:script
|
||||
message:starting Shadowsocks
|
||||
|
||||
[stop]
|
||||
command:/usr/local/etc/rc.d/shadowsocks_libev stop
|
||||
command:/usr/local/etc/rc.d/ssserver-rust stop
|
||||
parameters:
|
||||
type:script
|
||||
message:stopping Shadowsocks
|
||||
|
||||
[restart]
|
||||
command:/usr/local/etc/rc.d/shadowsocks_libev restart
|
||||
command:/usr/local/etc/rc.d/ssserver-rust restart
|
||||
parameters:
|
||||
type:script
|
||||
message:restarting Shadowsocks
|
||||
|
||||
[status]
|
||||
command:/usr/local/etc/rc.d/shadowsocks_libev status;exit 0
|
||||
command:/usr/local/etc/rc.d/ssserver-rust status
|
||||
errors:no
|
||||
parameters:
|
||||
type:script_output
|
||||
message:request Shadowsocks status
|
||||
|
||||
[start-local]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local start
|
||||
parameters:
|
||||
type:script
|
||||
message:starting Shadowsocks Local
|
||||
|
||||
[stop-local]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local stop
|
||||
parameters:
|
||||
type:script
|
||||
message:stopping Shadowsocks Local
|
||||
|
||||
[restart-local]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local restart
|
||||
parameters:
|
||||
type:script
|
||||
message:restarting Shadowsocks Local
|
||||
|
||||
[status-local]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local status;exit 0
|
||||
parameters:
|
||||
type:script_output
|
||||
message:request Shadowsocks Local status
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
[start]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local start
|
||||
command:/usr/local/etc/rc.d/sslocal-rust start
|
||||
parameters:
|
||||
type:script
|
||||
message:starting Shadowsocks Local
|
||||
|
||||
[stop]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local stop
|
||||
command:/usr/local/etc/rc.d/sslocal-rust stop
|
||||
parameters:
|
||||
type:script
|
||||
message:stopping Shadowsocks Local
|
||||
|
||||
[restart]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local restart
|
||||
command:/usr/local/etc/rc.d/sslocal-rust restart
|
||||
parameters:
|
||||
type:script
|
||||
message:restarting Shadowsocks Local
|
||||
|
||||
[status]
|
||||
command:/usr/local/etc/rc.d/opnsense-ss-local status;exit 0
|
||||
command:/usr/local/etc/rc.d/sslocal-rust status
|
||||
errors:no
|
||||
parameters:
|
||||
type:script_output
|
||||
message:request Shadowsocks Local status
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
shadowsocks_libev:/etc/rc.conf.d/shadowsocks_libev
|
||||
shadowsocks.conf:/usr/local/etc/shadowsocks-libev/config.json
|
||||
ss_local:/etc/rc.conf.d/ss_local
|
||||
ss_local.conf:/usr/local/etc/shadowsocks-libev/local.json
|
||||
ssserver:/etc/rc.conf.d/ssserver_rust
|
||||
shadowsocks.conf:/usr/local/etc/shadowsocks-rust/config.json
|
||||
sslocal:/etc/rc.conf.d/sslocal_rust
|
||||
sslocal.conf:/usr/local/etc/shadowsocks-rust/local.json
|
||||
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.shadowsocks.local.enabled') and OPNsense.shadowsocks.local.enabled == '1' %}
|
||||
ss_local_enable="YES"
|
||||
ss_local_flags=""
|
||||
sslocal_rust_enable="YES"
|
||||
{% else %}
|
||||
ss_local_enable="NO"
|
||||
sslocal_rust_enable="NO"
|
||||
{% endif %}
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.shadowsocks.general.enabled') and OPNsense.shadowsocks.general.enabled == '1' %}
|
||||
shadowsocks_libev_enable="YES"
|
||||
shadowsocks_libev_flags=""
|
||||
ssserver_rust_enable="YES"
|
||||
{% else %}
|
||||
shadowsocks_libev_enable="NO"
|
||||
ssserver_rust_enable="NO"
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user