trojan-plus: change source

This commit is contained in:
CN_SZTL 2020-07-17 21:41:45 +08:00
parent 923969e13c
commit 1ce460e102
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
6 changed files with 10 additions and 3349 deletions

View File

@ -94,7 +94,7 @@ end
if is_installed("brook") or is_finded("brook") then
type:value("Brook", translate("Brook"))
end
if is_installed("trojan") or is_finded("trojan") then
if is_installed("trojan-plus") or is_finded("trojan-plus") then
type:value("Trojan", translate("Trojan-Plus"))
end
if is_installed("trojan-go") or is_finded("trojan-go") then

View File

@ -81,7 +81,7 @@ local function start()
bin = ln_start(_api.get_v2ray_path(), "v2ray", "-config=" .. config_file)
elseif type == "Trojan" then
config = require("luci.model.cbi.passwall.server.api.trojan").gen_config(user)
bin = ln_start("/usr/sbin/trojan", "trojan", "-c " .. config_file)
bin = ln_start("/usr/sbin/trojan-plus", "trojan-plus", "-c " .. config_file)
elseif type == "Brook" then
local brook_protocol = user.brook_protocol
local brook_password = user.password
@ -127,4 +127,4 @@ if action then
elseif action == "stop" then
stop()
end
end
end

View File

@ -74,7 +74,7 @@ end
if is_installed("brook") or is_finded("brook") then
type:value("Brook", translate("Brook"))
end
if is_installed("trojan") or is_finded("trojan") then
if is_installed("trojan-plus") or is_finded("trojan-plus") then
type:value("Trojan", translate("Trojan-Plus"))
end
if is_installed("trojan-go") or is_finded("trojan-go") then

View File

@ -255,7 +255,7 @@ run_socks() {
ln_start_bin $(config_t_get global_app v2ray_file $(find_bin v2ray))/v2ray v2ray "-config=$config_file"
elif [ "$type" == "trojan" ]; then
lua $API_GEN_TROJAN $node client $bind $local_port > $config_file
ln_start_bin $(find_bin trojan) trojan "-c $config_file"
ln_start_bin $(find_bin trojan-plus) trojan-plus "-c $config_file"
elif [ "$type" == "trojan-go" ]; then
lua $API_GEN_TROJAN $node client $bind $local_port > $config_file
ln_start_bin $(config_t_get global_app trojan_go_file $(find_bin trojan-go)) trojan-go "-config $config_file"
@ -308,7 +308,7 @@ run_redir() {
ln_start_bin $(config_t_get global_app v2ray_file $(find_bin v2ray))/v2ray v2ray "-config=$config_file"
elif [ "$type" == "trojan" ]; then
lua $API_GEN_TROJAN $node nat "0.0.0.0" $local_port >$config_file
ln_start_bin $(find_bin trojan) trojan "-c $config_file"
ln_start_bin $(find_bin trojan-plus) trojan-plus "-c $config_file"
elif [ "$type" == "trojan-go" ]; then
lua $API_GEN_TROJAN $node nat "0.0.0.0" $local_port >$config_file
ln_start_bin $(config_t_get global_app trojan_go_file $(find_bin trojan-go)) trojan-go "-config $config_file"
@ -343,7 +343,7 @@ run_redir() {
elif [ "$type" == "trojan" ]; then
lua $API_GEN_TROJAN $node nat "0.0.0.0" $local_port > $config_file
for k in $(seq 1 $process); do
ln_start_bin $(find_bin trojan) trojan "-c $config_file"
ln_start_bin $(find_bin trojan-plus) trojan-plus "-c $config_file"
done
elif [ "$type" == "trojan-go" ]; then
lua $API_GEN_TROJAN $node nat "0.0.0.0" $local_port > $config_file

View File

@ -11,9 +11,9 @@ PKG_VERSION:=10.0.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Trojan-Plus-Group/trojan-plus.git
PKG_SOURCE_URL:=https://github.com/peter-tank/trojan-plus.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=4af7ff4dd48c7257c354d4e6dafafcdf5f12379c
PKG_SOURCE_VERSION:=2a15d2c886cb23f4d5a8ff975fa3c87819046390
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
@ -62,7 +62,7 @@ endef
define Package/trojan-plus/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/trojan
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/trojan-plus
endef
$(eval $(call BuildPackage,trojan-plus))

File diff suppressed because it is too large Load Diff