diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua b/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua index c9f2c7701..93a797f48 100755 --- a/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua @@ -123,10 +123,10 @@ local function start() bin = ln_run("/usr/bin/" .. type .. "-server", type .. "-server", "-c " .. config_file .. " " .. udp_param, log_path) elseif type == "V2ray" then config = require(require_dir .. "v2ray").gen_config(user) - bin = ln_run(api.get_v2ray_path(), "v2ray", "run -config=" .. config_file, log_path) + bin = ln_run(api.get_v2ray_path(), "v2ray", "run -c " .. config_file, log_path) elseif type == "Xray" then config = require(require_dir .. "v2ray").gen_config(user) - bin = ln_run(api.get_xray_path(), "xray", "-config=" .. config_file, log_path) + bin = ln_run(api.get_xray_path(), "xray", "run -c " .. config_file, log_path) elseif type == "Trojan" then config = require(require_dir .. "trojan").gen_config(user) bin = ln_run("/usr/sbin/trojan", "trojan", "-c " .. config_file, log_path) diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh index 2b59dca28..4a8a81bec 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -353,8 +353,7 @@ run_v2ray() { _extra_param="${_extra_param} -tcp_proxy_way $tcp_proxy_way" _extra_param="${_extra_param} -loglevel $loglevel" lua $API_GEN_V2RAY ${_extra_param} > $config_file - [ "$type" = "xray" ] && ln_run "$(first_type $(config_t_get global_app ${type}_file) ${type})" ${type} $log_file -config="$config_file" - [ "$type" = "v2ray" ] && ln_run "$(first_type $(config_t_get global_app ${type}_file) ${type})" ${type} $log_file run -config="$config_file" + ln_run "$(first_type $(config_t_get global_app ${type}_file) ${type})" ${type} $log_file run -c "$config_file" } run_dns2socks() { @@ -437,8 +436,7 @@ run_socks() { local _extra_param="-local_http_port $http_port" } lua $API_GEN_V2RAY_PROTO -local_socks_port $socks_port ${_extra_param} -server_proto socks -server_address ${_socks_address} -server_port ${_socks_port} -server_username ${_socks_username} -server_password ${_socks_password} > $config_file - [ "$type" = "xray" ] && ln_run "$bin" $type $log_file -config="$config_file" - [ "$type" = "v2ray" ] && ln_run "$bin" $type $log_file run -config="$config_file" + ln_run "$bin" $type $log_file run -c "$config_file" ;; v2ray|\ xray) @@ -515,8 +513,9 @@ run_socks() { fi [ -z "$type" ] && return 1 lua $API_GEN_V2RAY_PROTO -local_http_port $http_port -server_proto socks -server_address "127.0.0.1" -server_port $socks_port -server_username $_username -server_password $_password > $http_config_file - ln_run "$bin" ${type} /dev/null -config="$http_config_file" + ln_run "$bin" ${type} /dev/null run -c "$http_config_file" } + unset http_flag } run_redir() {