Skip to content

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
frainzy1477 committed Nov 22, 2020
1 parent 548e275 commit 68fa51d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Proxy Client for Openwrt Based On <a href="https://github.com/p4gefau1t/trojan-go" target="_blank">Trojan-GO</a>.
</p>
<p align="center">
<a target="_blank" href="https://github.com/frainzy1477/luci-app-trojan/releases/tag/v2.0.1">
<img src="https://img.shields.io/badge/Luci%20App%20For%20TrojanGo-v2.0.1-blue.svg">
<a target="_blank" href="https://github.com/frainzy1477/luci-app-trojan/releases/tag/v2.0.2">
<img src="https://img.shields.io/badge/Luci%20App%20For%20TrojanGo-v2.0.2-blue.svg">
</a>
<a href="https://github.com/frainzy1477/luci-app-trojan/releases" target="_blank">
<img src="https://img.shields.io/github/downloads/frainzy1477/luci-app-trojan/total.svg?style=flat-square"/>
Expand All @@ -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
Expand Down Expand Up @@ -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) .
Expand All @@ -72,11 +72,6 @@ trojan-go://[email protected]: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,
Expand Down
85 changes: 43 additions & 42 deletions root/etc/init.d/trojan
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion root/usr/share/trojan/luci_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.1
v2.0.2

0 comments on commit 68fa51d

Please sign in to comment.