diff --git a/Makefile b/Makefile index 8721242..9c6c7e8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-trojan -PKG_VERSION:=v2.0.1 +PKG_VERSION:=v2.0.2 PKG_MAINTAINER:=frainzy1477 include $(INCLUDE_DIR)/package.mk diff --git a/README.md b/README.md index 0034cfa..4a180bd 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Proxy Client for Openwrt Based On Trojan-GO.
- - + + @@ -18,8 +18,8 @@ - Upload ipk file to tmp folder - cd /tmp - opkg update -- opkg install luci-app-trojan_v2.0.1_all.ipk -- opkg install luci-app-trojan_v2.0.1_all.ipk --force-depends +- opkg install luci-app-trojan_v2.0.2_all.ipk +- opkg install luci-app-trojan_v2.0.2_all.ipk --force-depends ## Uninstall - opkg remove luci-app-trojan @@ -53,7 +53,7 @@ - iptables-mod-tproxy ## Credits -* Trojan-Go [Trojan-Go](https://github.com/p4gefau1t/trojan-go) by [p4gefau1t](https://github.com/p4gefau1t) +* [Trojan-Go](https://github.com/p4gefau1t/trojan-go) by [p4gefau1t](https://github.com/p4gefau1t) ## License Luci App For Trojan-Go OpenWrt is released under the GPL v3.0 License - see detailed [LICENSE](https://github.com/frainzy1477/luci-app-trojan/blob/master/LICENSE) . @@ -72,11 +72,6 @@ trojan-go://79225126-b565-3e5d-a576-1b8f0425e5fd@uk3.xxx.com:443/?sni=uk3.xxx.co "enabled": true }, "buffer_size": 32, - "forward_proxy": { - "enabled": false, - "proxy_addr": "127.0.0.1", - "proxy_port": 1086 - }, "local_addr": "0.0.0.0", "local_port": 51837, "log_level": 1, diff --git a/root/etc/init.d/trojan b/root/etc/init.d/trojan index cd95251..55fa8ee 100644 --- a/root/etc/init.d/trojan +++ b/root/etc/init.d/trojan @@ -109,48 +109,7 @@ if [ "${global_config}" -eq 1 ];then cat >> /tmp/trojan.json <<-EOF { - "api": { - "api_addr": "127.0.0.1", - "api_port": 57721, - "enabled": true - }, - "run_type": "nat", - "local_addr": "0.0.0.0", - "local_port": 51837, - "buffer_size": 32, - "log_level": 1, - "log_file": "$REAL_LOG", - "password": ["$(uci_get_by_name $1 password)"], - "remote_addr": "$(uci_get_by_name $1 remote_addr)", - "remote_port": $(uci_get_by_name $1 remote_port), - "ssl": { - "alpn": [ - "h2", - "http/1.1" - ], - "cert": "", - "cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-SHA:AES256-SHA:DES-CBC3-SHA", - "cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384", - "curves": "", - "fingerprint": "$(uci_get_by_name $1 fingerprint)", -EOF -if [ "$(uci_get_by_name $1 reuse_session)" == "true" ];then -cat >> /tmp/trojan.json <<-EOF - "reuse_session": $(uci_get_by_name $1 reuse_session), - EOF -fi -if [ "$(uci_get_by_name $1 session_ticket)" == "true" ];then -cat >> /tmp/trojan.json <<-EOF - "session_ticket": $(uci_get_by_name $1 session_ticket), - EOF -fi -cat >> /tmp/trojan.json <<-EOF - "sni": "$(uci_get_by_name $1 sni)", - "verify": true, - "verify_hostname": true - }, EOF - if [ "$(uci_get_by_name $1 mux)" == "true" ];then cat >> /tmp/trojan.json <<-EOF "mux": { @@ -202,9 +161,51 @@ cat >> /tmp/trojan.json <<-EOF "enabled": true, "host": "$(uci_get_by_name $1 websocket_host)", "path": "$(uci_get_by_name $1 path)" - } + }, EOF fi +cat >> /tmp/trojan.json <<-EOF + "api": { + "api_addr": "127.0.0.1", + "api_port": 57721, + "enabled": true + }, + "run_type": "nat", + "local_addr": "0.0.0.0", + "local_port": 51837, + "buffer_size": 32, + "log_level": 1, + "log_file": "$REAL_LOG", + "password": ["$(uci_get_by_name $1 password)"], + "remote_addr": "$(uci_get_by_name $1 remote_addr)", + "remote_port": $(uci_get_by_name $1 remote_port), + "ssl": { + "alpn": [ + "h2", + "http/1.1" + ], + "cert": "", + "cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-SHA:AES256-SHA:DES-CBC3-SHA", + "cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384", + "curves": "", + "fingerprint": "$(uci_get_by_name $1 fingerprint)", +EOF +if [ "$(uci_get_by_name $1 reuse_session)" == "true" ];then +cat >> /tmp/trojan.json <<-EOF + "reuse_session": $(uci_get_by_name $1 reuse_session), + EOF +fi +if [ "$(uci_get_by_name $1 session_ticket)" == "true" ];then +cat >> /tmp/trojan.json <<-EOF + "session_ticket": $(uci_get_by_name $1 session_ticket), + EOF +fi +cat >> /tmp/trojan.json <<-EOF + "sni": "$(uci_get_by_name $1 sni)", + "verify": true, + "verify_hostname": true + } +EOF cat >> /tmp/trojan.json <<-EOF } EOF diff --git a/root/usr/share/trojan/luci_version b/root/usr/share/trojan/luci_version index 0ac852d..f3b15f3 100644 --- a/root/usr/share/trojan/luci_version +++ b/root/usr/share/trojan/luci_version @@ -1 +1 @@ -v2.0.1 +v2.0.2