mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-06 18:27:06 +08:00
luci-app-ssr-plus: socks listens on IPv6
This commit is contained in:
parent
a2a6abcd63
commit
5e96181fcc
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-ssr-plus
|
PKG_NAME:=luci-app-ssr-plus
|
||||||
PKG_VERSION:=163
|
PKG_VERSION:=163
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server
|
|||||||
|
|
||||||
config PACKAGE_$(PKG_NAME)_INCLUDE_DNS2SOCKS
|
config PACKAGE_$(PKG_NAME)_INCLUDE_DNS2SOCKS
|
||||||
bool "Include DNS2SOCKS"
|
bool "Include DNS2SOCKS"
|
||||||
default n
|
default y if x86_64
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)
|
define Package/$(PKG_NAME)
|
||||||
|
@ -90,7 +90,7 @@ gen_config_file() {
|
|||||||
{
|
{
|
||||||
"server": "$hostip",
|
"server": "$hostip",
|
||||||
"server_port": $(uci_get_by_name $1 server_port),
|
"server_port": $(uci_get_by_name $1 server_port),
|
||||||
"local_address": "0.0.0.0",
|
"local_address": "::",
|
||||||
"local_port": $(uci_get_by_name $1 local_port),
|
"local_port": $(uci_get_by_name $1 local_port),
|
||||||
"password": "$(uci_get_by_name $1 password)",
|
"password": "$(uci_get_by_name $1 password)",
|
||||||
"timeout": $(uci_get_by_name $1 timeout 60),
|
"timeout": $(uci_get_by_name $1 timeout 60),
|
||||||
@ -111,7 +111,7 @@ gen_config_file() {
|
|||||||
{
|
{
|
||||||
"server": "$hostip",
|
"server": "$hostip",
|
||||||
"server_port": $(uci_get_by_name $1 server_port),
|
"server_port": $(uci_get_by_name $1 server_port),
|
||||||
"local_address": "0.0.0.0",
|
"local_address": "::",
|
||||||
"local_port": $(uci_get_by_name $1 local_port),
|
"local_port": $(uci_get_by_name $1 local_port),
|
||||||
"password": "$(uci_get_by_name $1 password)",
|
"password": "$(uci_get_by_name $1 password)",
|
||||||
"timeout": $(uci_get_by_name $1 timeout 60),
|
"timeout": $(uci_get_by_name $1 timeout 60),
|
||||||
@ -413,7 +413,7 @@ gen_service_file() {
|
|||||||
fi
|
fi
|
||||||
cat <<-EOF >$2
|
cat <<-EOF >$2
|
||||||
{
|
{
|
||||||
"server": "0.0.0.0",
|
"server": "::",
|
||||||
"server_port": $(uci_get_by_name $1 server_port),
|
"server_port": $(uci_get_by_name $1 server_port),
|
||||||
"password": "$(uci_get_by_name $1 password)",
|
"password": "$(uci_get_by_name $1 password)",
|
||||||
"timeout": $(uci_get_by_name $1 timeout 60),
|
"timeout": $(uci_get_by_name $1 timeout 60),
|
||||||
@ -478,9 +478,9 @@ start_local() {
|
|||||||
local auth_enable=$(uci_get_by_type socks5_proxy auth_enable 0)
|
local auth_enable=$(uci_get_by_type socks5_proxy auth_enable 0)
|
||||||
local socks_port=$(uci_get_by_type socks5_proxy local_port 1080)
|
local socks_port=$(uci_get_by_type socks5_proxy local_port 1080)
|
||||||
if [ "$auth_enable" == "1" ]; then
|
if [ "$auth_enable" == "1" ]; then
|
||||||
microsocks -i 0.0.0.0 -p $socks_port -1 -u $(uci_get_by_type socks5_proxy username) -P $(uci_get_by_type socks5_proxy password) ssr-socks >/dev/null 2>&1 &
|
microsocks -i :: -p $socks_port -1 -u $(uci_get_by_type socks5_proxy username) -P $(uci_get_by_type socks5_proxy password) ssr-socks >/dev/null 2>&1 &
|
||||||
else
|
else
|
||||||
microsocks -i 0.0.0.0 -p $socks_port ssr-socks >/dev/null 2>&1 &
|
microsocks -i :: -p $socks_port ssr-socks >/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
local_enable=1
|
local_enable=1
|
||||||
if [ "$(uci_get_by_type socks5_proxy wan_enable 0)" == "1" ]; then
|
if [ "$(uci_get_by_type socks5_proxy wan_enable 0)" == "1" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user