From 346875d78591574ac4b9ebc3536b8ce085ff3a0b Mon Sep 17 00:00:00 2001 From: z Date: Sat, 3 Jun 2017 22:25:26 +0800 Subject: [PATCH 01/18] add config option ssrdns_disable. When use unbound as DNS tunnel server, set this option to 1 will stop using ssr control DNS tunnel startup. --- files/shadowsocksr.config | 1 + files/shadowsocksr.init | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/files/shadowsocksr.config b/files/shadowsocksr.config index d3694b9..c1b7841 100644 --- a/files/shadowsocksr.config +++ b/files/shadowsocksr.config @@ -2,6 +2,7 @@ config global option global_server 'nil' option monitor_enable '1' + option ssrdns_disable '0' option tunnel_enable '0' option tunnel_port '5300' option tunnel_forward '8.8.4.4:53' diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index ec6667a..b98e05b 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -263,8 +263,11 @@ start_redir() { #deal with dns if [ -n "$gfw_enable" ] ;then if [ "$(uci_get_by_type global pdnsd_enable)" != "1" ] ;then - service_start /usr/bin/ssr-tunnel -c $CONFIG_FILE -b 0.0.0.0 -u -l 5353 -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) -f /var/run/ssr-dns.pid - dns_enable_flag=1 + # set ssrdns_disable to 1 when using chinadns or unbound + if [ "$(uci_get_by_type global ssrdns_disable)" != "1" ] ;then + service_start /usr/bin/ssr-tunnel -c $CONFIG_FILE -b 0.0.0.0 -u -l 5353 -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) -f /var/run/ssr-dns.pid + dns_enable_flag=1 + fi else local dnsstr="$(uci_get_by_type global tunnel_forward 8.8.4.4:53)" local dnsserver=`echo "$dnsstr"|awk -F ':' '{print $1}'` From f94d7647d681e0bd53fee4775b289d1a48aec6bf Mon Sep 17 00:00:00 2001 From: z Date: Fri, 9 Jun 2017 17:55:44 +0800 Subject: [PATCH 02/18] change shadowsocksr-libev src url, version update --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c8cac51..6ff2a05 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ PKG_VERSION:=1.2.1 #PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/ywb94/shadowsocks-libev -PKG_SOURCE_VERSION:=11db1d5e48f539855ea1a66947eba9bb9bc82150 +PKG_SOURCE_URL:=https://github.com/shadowsocksr/shadowsocksr-libev +PKG_SOURCE_VERSION:=44a8da40751671adda170d3902e98b5ff07705c7 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) From 78592c241c86689f76c20a7b33fbb3e85d7d262d Mon Sep 17 00:00:00 2001 From: z Date: Fri, 16 Jun 2017 03:18:10 +0800 Subject: [PATCH 03/18] shadowsocksr-libev version bump --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6ff2a05..bbc27fb 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ PKG_VERSION:=1.2.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksr/shadowsocksr-libev -PKG_SOURCE_VERSION:=44a8da40751671adda170d3902e98b5ff07705c7 +PKG_SOURCE_VERSION:=f713aa981169d35ff9483b295d1209c35117d70c PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) From c1710304c943a24091320e382791bc769be40c36 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 30 Jun 2017 17:20:14 +0800 Subject: [PATCH 04/18] Update protocol --- Makefile | 20 +++++++++---------- .../model/cbi/shadowsocksr/client-config.lua | 8 ++++---- files/luci/model/cbi/shadowsocksr/client.lua | 9 ++++----- .../model/cbi/shadowsocksr/server-config.lua | 9 +++++++-- files/luci/model/cbi/shadowsocksr/server.lua | 9 +++++++-- 5 files changed, 32 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index bbc27fb..c5e9f85 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr -PKG_VERSION:=1.2.1 +PKG_VERSION:=1.2.2 #PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -38,7 +38,7 @@ define Package/openwrt-ssr/Default CATEGORY:=LuCI SUBMENU:=3. Applications TITLE:=shadowsocksR-libev LuCI interface - URL:=https://github.com/ywb94/openwrt-ssr + URL:=https://github.com/nobk/openwrt-ssr VARIANT:=$(1) DEPENDS:=$(3) PKGARCH:=all @@ -158,10 +158,10 @@ define Package/openwrt-ssr/install $(call Install/common,$(1)) $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check $(INSTALL_BIN) ./files/shadowsocksr.rule $(1)/usr/bin/ssr-rules $(INSTALL_BIN) ./files/shadowsocksr.monitor $(1)/usr/bin/ssr-monitor $(INSTALL_BIN) ./files/shadowsocksr.switch $(1)/usr/bin/ssr-switch @@ -175,9 +175,9 @@ define Package/luci-app-shadowsocksR-Client/install $(call Install/common,$(1)) $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check $(INSTALL_BIN) ./files/shadowsocksr.rule $(1)/usr/bin/ssr-rules $(INSTALL_BIN) ./files/shadowsocksr.monitor $(1)/usr/bin/ssr-monitor $(INSTALL_BIN) ./files/shadowsocksr.switch $(1)/usr/bin/ssr-switch @@ -197,10 +197,10 @@ define Package/luci-app-shadowsocksR-GFW/install $(call Install/common,$(1)) $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server + #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check $(INSTALL_BIN) ./files/shadowsocksr.rule $(1)/usr/bin/ssr-rules $(INSTALL_BIN) ./files/shadowsocksr.monitor $(1)/usr/bin/ssr-monitor $(INSTALL_BIN) ./files/shadowsocksr.gfw $(1)/usr/bin/ssr-gfw diff --git a/files/luci/model/cbi/shadowsocksr/client-config.lua b/files/luci/model/cbi/shadowsocksr/client-config.lua index 5298d1f..7808799 100644 --- a/files/luci/model/cbi/shadowsocksr/client-config.lua +++ b/files/luci/model/cbi/shadowsocksr/client-config.lua @@ -48,21 +48,21 @@ local encrypt_methods = { local protocol = { "origin", - "verify_simple", - "verify_sha1", - "auth_sha1", - "auth_sha1_v2", + "verify_deflate", "auth_sha1_v4", "auth_aes128_sha1", "auth_aes128_md5", + "auth_chain_a", } obfs = { "plain", "http_simple", "http_post", + "random_head", "tls_simple", "tls1.2_ticket_auth", + "tls1.2_ticket_fastauth", } m = Map(shadowsocksr, translate("Edit ShadowSocksR Server")) diff --git a/files/luci/model/cbi/shadowsocksr/client.lua b/files/luci/model/cbi/shadowsocksr/client.lua index 3dd2f33..9bceffd 100644 --- a/files/luci/model/cbi/shadowsocksr/client.lua +++ b/files/luci/model/cbi/shadowsocksr/client.lua @@ -51,21 +51,20 @@ local encrypt_methods = { local protocol = { "origin", - "verify_simple", - "verify_sha1", - "auth_sha1", - "auth_sha1_v2", + "verify_deflate", "auth_sha1_v4", "auth_aes128_sha1", "auth_aes128_md5", + "auth_chain_a", } obfs = { "plain", "http_simple", "http_post", - "tls_simple", + "random_head", "tls1.2_ticket_auth", + "tls1.2_ticket_fastauth", } diff --git a/files/luci/model/cbi/shadowsocksr/server-config.lua b/files/luci/model/cbi/shadowsocksr/server-config.lua index eb25e9c..cf263b5 100644 --- a/files/luci/model/cbi/shadowsocksr/server-config.lua +++ b/files/luci/model/cbi/shadowsocksr/server-config.lua @@ -32,15 +32,20 @@ local encrypt_methods = { local protocol = { "origin", - "verify_simple", - "verify_sha1", + "verify_deflate", + "auth_sha1_v4", + "auth_aes128_sha1", + "auth_aes128_md5", + "auth_chain_a", } obfs = { "plain", "http_simple", "http_post", + "random_head", "tls1.2_ticket_auth", + "tls1.2_ticket_fastauth", } m = Map(shadowsocksr, translate("Edit ShadowSocksR Server")) diff --git a/files/luci/model/cbi/shadowsocksr/server.lua b/files/luci/model/cbi/shadowsocksr/server.lua index 9a6ea28..2157a75 100644 --- a/files/luci/model/cbi/shadowsocksr/server.lua +++ b/files/luci/model/cbi/shadowsocksr/server.lua @@ -36,15 +36,20 @@ local encrypt_methods = { local protocol = { "origin", - "verify_simple", - "verify_sha1", + "verify_deflate", + "auth_sha1_v4", + "auth_aes128_sha1", + "auth_aes128_md5", + "auth_chain_a", } obfs = { "plain", "http_simple", "http_post", + "random_head", "tls1.2_ticket_auth", + "tls1.2_ticket_fastauth", } From 94a220b3003d1e95d20820680656597f3703512c Mon Sep 17 00:00:00 2001 From: z Date: Sun, 9 Jul 2017 03:28:12 +0800 Subject: [PATCH 05/18] shadowsocksr-libev version bump --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c5e9f85..8d003f5 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr -PKG_VERSION:=1.2.2 +PKG_VERSION:=1.3.2 #PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksr/shadowsocksr-libev -PKG_SOURCE_VERSION:=f713aa981169d35ff9483b295d1209c35117d70c +PKG_SOURCE_VERSION:=bf324d848cffa0b5b567cfa6d31c0fb1ec096ec6 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) From 79d285969a57be3d5110f507a8473289d9cda540 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 14 Jul 2017 19:04:49 +0800 Subject: [PATCH 06/18] luci fix --- files/luci/model/cbi/shadowsocksr/client-config.lua | 1 - files/luci/model/cbi/shadowsocksr/client.lua | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/files/luci/model/cbi/shadowsocksr/client-config.lua b/files/luci/model/cbi/shadowsocksr/client-config.lua index 7808799..c90e461 100644 --- a/files/luci/model/cbi/shadowsocksr/client-config.lua +++ b/files/luci/model/cbi/shadowsocksr/client-config.lua @@ -20,7 +20,6 @@ end local server_table = {} -local arp_table = luci.sys.net.arptable() or {} local encrypt_methods = { "table", "rc4", diff --git a/files/luci/model/cbi/shadowsocksr/client.lua b/files/luci/model/cbi/shadowsocksr/client.lua index 9bceffd..828d4f7 100644 --- a/files/luci/model/cbi/shadowsocksr/client.lua +++ b/files/luci/model/cbi/shadowsocksr/client.lua @@ -23,7 +23,6 @@ end m = Map(shadowsocksr, translate("ShadowSocksR Client")) local server_table = {} -local arp_table = luci.sys.net.arptable() or {} local encrypt_methods = { "table", "rc4", @@ -252,6 +251,9 @@ o.rmempty = false o = s:taboption("lan_ac", DynamicList, "lan_ac_ips", translate("LAN Host List")) o.datatype = "ipaddr" -for _, v in ipairs(arp_table) do o:value(v["IP address"]) end - +luci.ip.neighbors({ family = 4 }, function(entry) + if entry.reachable then + o:value(entry.dest:string()) + end +end) return m From 619154358902cfea07e76cbbd63e5001cad8130c Mon Sep 17 00:00:00 2001 From: z Date: Mon, 24 Jul 2017 00:31:48 +0800 Subject: [PATCH 07/18] ssr-local bind address configurable --- files/shadowsocksr.config | 1 + files/shadowsocksr.init | 1 + 2 files changed, 2 insertions(+) diff --git a/files/shadowsocksr.config b/files/shadowsocksr.config index c1b7841..403e1ac 100644 --- a/files/shadowsocksr.config +++ b/files/shadowsocksr.config @@ -28,6 +28,7 @@ config servers config socks5_proxy option server 'nil' option local_port '1080' + option local_address '0.0.0.0' config access_control option lan_ac_mode '0' diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index b98e05b..8aaa67c 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -374,6 +374,7 @@ start_local() { gen_config_file $local_server 2 /usr/bin/ssr-local -c $CONFIG_SOCK5_FILE -u \ -l $(uci_get_by_type socks5_proxy local_port 1080) \ + -b $(uci_get_by_type socks5_proxy local_address 0.0.0.0) \ -f /var/run/ssr-local.pid local_enable=1 } From 51d927fe7b89688f079897338ed3d3a583977c5f Mon Sep 17 00:00:00 2001 From: z Date: Tue, 25 Jul 2017 06:46:19 +0800 Subject: [PATCH 08/18] tunnel --- Makefile | 4 ++-- files/shadowsocksr.init | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8d003f5..4925e14 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr -PKG_VERSION:=1.3.2 -#PKG_RELEASE:=1 +PKG_VERSION:=3.0.6 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksr/shadowsocksr-libev diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index 8aaa67c..2726f1e 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -375,6 +375,7 @@ start_local() { /usr/bin/ssr-local -c $CONFIG_SOCK5_FILE -u \ -l $(uci_get_by_type socks5_proxy local_port 1080) \ -b $(uci_get_by_type socks5_proxy local_address 0.0.0.0) \ + -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) \ -f /var/run/ssr-local.pid local_enable=1 } From bc0484fd2b447919a1744b2a2314fe8d7d4e0e13 Mon Sep 17 00:00:00 2001 From: Zero One Date: Sat, 29 Jul 2017 12:05:27 +0800 Subject: [PATCH 09/18] tune ssr source url --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4925e14..25c3c96 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr PKG_VERSION:=3.0.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/shadowsocksr/shadowsocksr-libev +PKG_SOURCE_URL:=https://github.com/shadowsocksr-rm/shadowsocksr-libev PKG_SOURCE_VERSION:=bf324d848cffa0b5b567cfa6d31c0fb1ec096ec6 PKG_SOURCE_PROTO:=git @@ -21,7 +21,7 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=yushi studio +PKG_MAINTAINER:=breakwa11 #PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) From 76f8af7d1ce170a4b77005ac8acd09fdd006ab49 Mon Sep 17 00:00:00 2001 From: Zero One Date: Sat, 29 Jul 2017 16:26:14 +0800 Subject: [PATCH 10/18] add auth_chain_a and UI settings --- Makefile | 2 +- README.md | 1 + files/luci/i18n/shadowsocksr.zh-cn.lmo | Bin 3848 -> 3896 bytes files/luci/i18n/shadowsocksr.zh-cn.po | 3 +++ .../model/cbi/shadowsocksr/client-config.lua | 6 +++--- files/luci/model/cbi/shadowsocksr/client.lua | 4 ++-- files/luci/model/cbi/shadowsocksr/status.lua | 2 +- files/shadowsocksr.init | 2 ++ 8 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 25c3c96..74564a8 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr PKG_VERSION:=3.0.6 -PKG_RELEASE:=2 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksr-rm/shadowsocksr-libev diff --git a/README.md b/README.md index 2c84a02..2740380 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ GFW版本支持IP路由模式和GFW列表模式,需卸载原有的dnsmasq, password | 字符串 | 服务端设置的密码 encrypt_method | 字符串 | 加密方式, [详情参考][2] protocol | 字符串 | 传输协议,默认"origin"[详情参考][3] + protocol_param | 字符串 | 传输协议插件参数(可选) obfs | 字符串 | 混淆插件,默认"plain" [详情参考][3] obfs_param | 字符串 | 混淆插件参数 [详情参考][3] fast_open | 布尔型 | TCP快速打开 [详情参考][3] diff --git a/files/luci/i18n/shadowsocksr.zh-cn.lmo b/files/luci/i18n/shadowsocksr.zh-cn.lmo index 3878244c5c5d7c88eee361d4bb50e63fb02447b1..a9ba7a35ef8f834d50cfb9ee2a9c4d2438546309 100644 GIT binary patch delta 1276 zcmW-feK1^S6vp4(Wxw3rwOb69y`&PFwn0M6j1kGCv{JFDkD?odL>bx`lE$EDB(Y@D z#f`5_CzfPH+E_+4C8VL62^}fPR4XPvvt&gwM0Th~wa@K;`+Ls0&w0*ySF7q&wP`pm z#vZ-tCuZ)v&SWsm=}yg8wJr5%=X9+LMWstUrG$L1;qU}<6Cs4pbr0$zMGN-`v80$x zAzi44sjRf0w^bh{b8JLcCF?G>v>QO$e_Oe3;tg47<%6B2fQ@?YE99UDZ5DUM6G< z&l&=4({RM@V&K1<7zmNjPU^S^Q4X8+FwinCB3k|os-x=jslL#P93deBA)^-2t|L%o zE{&^ovA?DvtR*{K#tr+?gI>!41Bo zhgrt|d^^K`=$M-k5o*DTU13XEgIA9laFa2%?qj{Lprd&0BzD*U%Y4G!uZ^CTT*miW z##&5sOpKS9KFHqBIzT50Ts+I|h1YekBH$n8A;%Z9@Zz(xMSE3EJ!`?035d+DVEbOX zA$!M0m>>Ex+5X^?+#gHQV&dTK!RW^}KS7q=<7rUq;EM!4CFmRw6F6;)> z0sq&{Au+2+XxRpqMk_*`t8#~$Ff|d(k51iV^y;69!Uf(3%QU=WeDlR+Tll$vm51V2 zv{Hrf6SRHFGk_2#&`Ms&dh(N;BZmj6GuVpVj)+or#SX5Di(kW4rrCPR z$K`J)jQQ@y&r~p#+0rsQt6M=$(9CjHfLrz}-PJVIkF%VeeJL+L`b8rii>*sej6Uw4 zT8qoa4raD~^2W^FmFH2TSXamzTIFPalq&VOABq5KX4;DOzQVTUSC!THKHm;YOE=c0 z=!3?I^3!)7W9$If^_1uSuGkx|a3+qK@uFz?5LD5*{)f%c!(-hDU&|yyWgptEVzH0& za`M&`&h!>jPSLJ0P-S%^TAQRd6OEXA1WeVJ-rrssu_nZXT4sb&aV?yfWr{BBK+*Av zK2z)bJrIv8ad0|9{m}7k z>`eH~Wf<&Z^b${REmZril9vAVA1$sR-;vy*EwXZWrC#io=B*+6VvVLWY6(JBwPklMz?p4 z=27u~Ab=0pdVbrECr0!5-*9;Zmd&?VIkh$QhQP&((MwfZ_)d_OE9&Zq-U}75Vi1k*f`&XjCLzCS!ZP{c)21-plho@B8(#wp?pY z5&T>vaBxyt2_a&kZ&(j0d3>7?$ESRigfo>Osu5ot6dt=(H$sTuDOe>@+|-%bA(^1gTpDtp0d>2if;+V;gbArAH6J?x5LKtI(Hi~Lzy zuZ%xFpK>?z1tCIwgmY=$>vnqMzbj}J+GxNlCi!l>$4Vmv415g3srnK1)E*e?iL5qC zU}KsuVK|)`QH4*-d_&Uj*)S`j!x^1dyi-PswGO>LyoJ$bh!<&Dpi7tk+riDgggDWe znsxhQ9fjd%n!r2$=Nma8{Rj1Scrt?3>!Y6M^_|<-fg4<=`5@)i;;zz#!`R^gSP>NM zdw%GM><9E4_%JCau=43rZdWLB%Fs&L#+hS63$(rgt3&_M?Dl*)2`v$w&1})OURwyS zNdwarT(@<0&{xJ&<)s~A#cq^B+kR3s0u7kP)B&5D(G*;xx&EW1jA-~K<`96Are2ZBE{jLc<%HI zSLgwWW_Rjrxm<1k1f@k__q691MmI!W!AAT6XO)R+iZi_92Kv~e7tqrLX0p~N_03C5 z-@sKYG@tcx)w^l;f;Zvk2Vge0y?t`Ba&{b>lvBUgEW8m(!{OVXYoT=S3(7yjrkuLXCF{X{v+SV&eZpD?KA}6A(XkD79_x^I7Kjtoir5$Py=Pl<)6LEw9 zu%*?c+q_4lg`G>P1aN#Nq{E8 z{?heh(nRzG{+l8_Z2b_ReBcChhHU}Z#8SIDOR2?s7<<<#o6kL+{9e?#ROSTWV^>}77XL_kH!+vM6eMau|lW@Bn&Ehnqv d5Do*cnkzUI8hxE;(H6uj6&!;b5?GPM{Ra`KV)g(4 diff --git a/files/luci/i18n/shadowsocksr.zh-cn.po b/files/luci/i18n/shadowsocksr.zh-cn.po index ef67fab..79afe8f 100644 --- a/files/luci/i18n/shadowsocksr.zh-cn.po +++ b/files/luci/i18n/shadowsocksr.zh-cn.po @@ -61,6 +61,9 @@ msgstr "加密方式" msgid "Protocol" msgstr "传输协议" +msgid "Protocol param(optional)" +msgstr "传输协议参数(可选)" + msgid "Obfs" msgstr "混淆插件" diff --git a/files/luci/model/cbi/shadowsocksr/client-config.lua b/files/luci/model/cbi/shadowsocksr/client-config.lua index c90e461..9b1465e 100644 --- a/files/luci/model/cbi/shadowsocksr/client-config.lua +++ b/files/luci/model/cbi/shadowsocksr/client-config.lua @@ -21,10 +21,11 @@ end local server_table = {} local encrypt_methods = { + "none", "table", "rc4", - "rc4-md5", "rc4-md5-6", + "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", @@ -59,9 +60,7 @@ obfs = { "http_simple", "http_post", "random_head", - "tls_simple", "tls1.2_ticket_auth", - "tls1.2_ticket_fastauth", } m = Map(shadowsocksr, translate("Edit ShadowSocksR Server")) @@ -114,6 +113,7 @@ o = s:option(ListValue, "protocol", translate("Protocol")) for _, v in ipairs(protocol) do o:value(v) end o.rmempty = false +o = s:option(Value, "protocol_param", translate("Protocol param(optional)")) o = s:option(ListValue, "obfs", translate("Obfs")) for _, v in ipairs(obfs) do o:value(v) end diff --git a/files/luci/model/cbi/shadowsocksr/client.lua b/files/luci/model/cbi/shadowsocksr/client.lua index 828d4f7..1b743d6 100644 --- a/files/luci/model/cbi/shadowsocksr/client.lua +++ b/files/luci/model/cbi/shadowsocksr/client.lua @@ -24,10 +24,11 @@ m = Map(shadowsocksr, translate("ShadowSocksR Client")) local server_table = {} local encrypt_methods = { + "none", "table", "rc4", - "rc4-md5", "rc4-md5-6", + "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", @@ -63,7 +64,6 @@ obfs = { "http_post", "random_head", "tls1.2_ticket_auth", - "tls1.2_ticket_fastauth", } diff --git a/files/luci/model/cbi/shadowsocksr/status.lua b/files/luci/model/cbi/shadowsocksr/status.lua index 1b147e6..268ff63 100644 --- a/files/luci/model/cbi/shadowsocksr/status.lua +++ b/files/luci/model/cbi/shadowsocksr/status.lua @@ -1,7 +1,7 @@ -- Copyright (C) 2017 yushi studio -- Licensed to the public under the GNU General Public License v3. -local IPK_Version="1.2.1" +local IPK_Version="3.0.6-4" local m, s, o local redir_run=0 local reudp_run=0 diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index 2726f1e..301ad09 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -80,6 +80,7 @@ gen_config_file() { "timeout": $(uci_get_by_name $1 timeout 60), "method": "$(uci_get_by_name $1 encrypt_method)", "protocol": "$(uci_get_by_name $1 protocol)", + "protocol_param": "$(uci_get_by_name $1 protocol_param)", "obfs": "$(uci_get_by_name $1 obfs)", "obfs_param": "$(uci_get_by_name $1 obfs_param)", "fast_open": $fastopen @@ -305,6 +306,7 @@ gen_service_file() { "timeout": $(uci_get_by_name $1 timeout 60), "method": "$(uci_get_by_name $1 encrypt_method)", "protocol": "$(uci_get_by_name $1 protocol)", + "protocol_param": "$(uci_get_by_name $1 protocol_param)", "obfs": "$(uci_get_by_name $1 obfs)", "obfs_param": "$(uci_get_by_name $1 obfs_param)", "fast_open": $fastopen From b92b1ae0e33d4077d68b3404a278c5771c964ed1 Mon Sep 17 00:00:00 2001 From: Zero One Date: Sat, 29 Jul 2017 19:14:05 +0800 Subject: [PATCH 11/18] ssr-tunnel with bind address --- Makefile | 3 ++- files/luci/model/cbi/shadowsocksr/status.lua | 2 +- files/shadowsocksr.config | 1 + files/shadowsocksr.init | 14 ++++++++++++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 74564a8..d744765 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr PKG_VERSION:=3.0.6 -PKG_RELEASE:=4 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksr-rm/shadowsocksr-libev @@ -199,6 +199,7 @@ define Package/luci-app-shadowsocksR-GFW/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local + ln -s /usr/bin/ssr-local $(1)/usr/bin/ssr-tunnel #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check $(INSTALL_BIN) ./files/shadowsocksr.rule $(1)/usr/bin/ssr-rules diff --git a/files/luci/model/cbi/shadowsocksr/status.lua b/files/luci/model/cbi/shadowsocksr/status.lua index 268ff63..c54a37d 100644 --- a/files/luci/model/cbi/shadowsocksr/status.lua +++ b/files/luci/model/cbi/shadowsocksr/status.lua @@ -1,7 +1,7 @@ -- Copyright (C) 2017 yushi studio -- Licensed to the public under the GNU General Public License v3. -local IPK_Version="3.0.6-4" +local IPK_Version="3.0.6-7" local m, s, o local redir_run=0 local reudp_run=0 diff --git a/files/shadowsocksr.config b/files/shadowsocksr.config index 403e1ac..2fee9e2 100644 --- a/files/shadowsocksr.config +++ b/files/shadowsocksr.config @@ -6,6 +6,7 @@ config global option tunnel_enable '0' option tunnel_port '5300' option tunnel_forward '8.8.4.4:53' + option tunnel_address '0.0.0.0' config servers option auth_enable '0' diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index 301ad09..1602f16 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -266,7 +266,11 @@ start_redir() { if [ "$(uci_get_by_type global pdnsd_enable)" != "1" ] ;then # set ssrdns_disable to 1 when using chinadns or unbound if [ "$(uci_get_by_type global ssrdns_disable)" != "1" ] ;then - service_start /usr/bin/ssr-tunnel -c $CONFIG_FILE -b 0.0.0.0 -u -l 5353 -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) -f /var/run/ssr-dns.pid + service_start /usr/bin/ssr-tunnel -c $CONFIG_FILE -u \ + -l $(uci_get_by_type global tunnel_port 5353) \ + -b $(uci_get_by_type global tunnel_address 0.0.0.0) \ + -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) \ + -f /var/run/ssr-dns.pid dns_enable_flag=1 fi else @@ -360,13 +364,19 @@ start_server() { } start_tunnel() { + case "$(uci_get_by_type global tunnel_enable)" in + 1|on|true|yes|enabled) /usr/bin/ssr-tunnel \ -c $CONFIG_FILE $ARG_OTA ${ARG_UDP:="-u"} \ -l $(uci_get_by_type global tunnel_port 5300) \ + -b $(uci_get_by_type global tunnel_address 0.0.0.0) \ -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) \ -f /var/run/ssr-tunnel.pid tunnel_enable=1 return $? + ;; + esac + return 1 } start_local() { @@ -377,7 +387,6 @@ start_local() { /usr/bin/ssr-local -c $CONFIG_SOCK5_FILE -u \ -l $(uci_get_by_type socks5_proxy local_port 1080) \ -b $(uci_get_by_type socks5_proxy local_address 0.0.0.0) \ - -L $(uci_get_by_type global tunnel_forward 8.8.4.4:53) \ -f /var/run/ssr-local.pid local_enable=1 } @@ -422,6 +431,7 @@ EOF fi start_server start_local + start_tunnel if [ $(uci_get_by_type global monitor_enable) = 1 ] ;then let total_count=server_count+redir_tcp+redir_udp+tunnel_enable+kcp_enable_flag+local_enable+dns_enable_flag+switch_enable if [ $total_count -gt 0 ] From 8d691f95a9990bc7c7c1561dcfff108fc8c99ace Mon Sep 17 00:00:00 2001 From: Zero One Date: Mon, 31 Jul 2017 12:31:45 +0800 Subject: [PATCH 12/18] add ssr-tunnel to none GFW also --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d744765..858d48b 100644 --- a/Makefile +++ b/Makefile @@ -158,8 +158,8 @@ define Package/openwrt-ssr/install $(call Install/common,$(1)) $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir - #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local + $(LN) /usr/bin/ssr-local $(1)/usr/bin/ssr-tunnel #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check $(INSTALL_BIN) ./files/shadowsocksr.rule $(1)/usr/bin/ssr-rules @@ -197,9 +197,8 @@ define Package/luci-app-shadowsocksR-GFW/install $(call Install/common,$(1)) $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir - #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-tunnel $(1)/usr/bin/ssr-tunnel $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local - ln -s /usr/bin/ssr-local $(1)/usr/bin/ssr-tunnel + $(LN) /usr/bin/ssr-local $(1)/usr/bin/ssr-tunnel #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server #$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-check $(1)/usr/bin/ssr-check $(INSTALL_BIN) ./files/shadowsocksr.rule $(1)/usr/bin/ssr-rules From 3da531d482e7da00e6f81b6082b2ef3deaf23ade Mon Sep 17 00:00:00 2001 From: Zero One Date: Sun, 6 Aug 2017 16:44:40 +0800 Subject: [PATCH 13/18] add auth_chain_b --- Makefile | 8 ++++---- files/luci/model/cbi/shadowsocksr/client-config.lua | 1 + files/luci/model/cbi/shadowsocksr/client.lua | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 858d48b..aa13807 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr -PKG_VERSION:=3.0.6 -PKG_RELEASE:=7 +PKG_VERSION:=3.0.7 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/shadowsocksr-rm/shadowsocksr-libev -PKG_SOURCE_VERSION:=bf324d848cffa0b5b567cfa6d31c0fb1ec096ec6 +PKG_SOURCE_URL:=https://github.com/shadowsocksr-backup/shadowsocksr-libev.git +PKG_SOURCE_VERSION:=e2373d7199102f383b741da148b989c7c1e8832e PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/files/luci/model/cbi/shadowsocksr/client-config.lua b/files/luci/model/cbi/shadowsocksr/client-config.lua index 9b1465e..c1ae48a 100644 --- a/files/luci/model/cbi/shadowsocksr/client-config.lua +++ b/files/luci/model/cbi/shadowsocksr/client-config.lua @@ -53,6 +53,7 @@ local protocol = { "auth_aes128_sha1", "auth_aes128_md5", "auth_chain_a", + "auth_chain_b", } obfs = { diff --git a/files/luci/model/cbi/shadowsocksr/client.lua b/files/luci/model/cbi/shadowsocksr/client.lua index 1b743d6..50c5ebc 100644 --- a/files/luci/model/cbi/shadowsocksr/client.lua +++ b/files/luci/model/cbi/shadowsocksr/client.lua @@ -56,6 +56,7 @@ local protocol = { "auth_aes128_sha1", "auth_aes128_md5", "auth_chain_a", + "auth_chain_b", } obfs = { From 182e0ca8b893027ed7fc0e814f2bad86e0de5102 Mon Sep 17 00:00:00 2001 From: Zero One Date: Wed, 4 Oct 2017 15:49:24 +0800 Subject: [PATCH 14/18] import/export server settings by ssr url --- Makefile | 2 +- README.md | 2 + files/luci/i18n/shadowsocksr.zh-cn.lmo | Bin 3896 -> 4236 bytes files/luci/i18n/shadowsocksr.zh-cn.po | 24 +++ .../model/cbi/shadowsocksr/client-config.lua | 5 + files/luci/view/shadowsocksr/ssrurl.htm | 139 ++++++++++++++++++ 6 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 files/luci/view/shadowsocksr/ssrurl.htm diff --git a/Makefile b/Makefile index aa13807..5986a9d 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr PKG_VERSION:=3.0.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksr-backup/shadowsocksr-libev.git diff --git a/README.md b/README.md index 2740380..a3ced18 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ ShadowsocksR-libev for OpenWrt 客户端兼容运行SS或SSR的服务器,使用SS服务器时,传输协议需设置为origin,混淆插件需设置为plain +支持 ssr:// url格式导入和导出服务器配置信息 + 运行模式介绍 --- 【IP路由模式】 diff --git a/files/luci/i18n/shadowsocksr.zh-cn.lmo b/files/luci/i18n/shadowsocksr.zh-cn.lmo index a9ba7a35ef8f834d50cfb9ee2a9c4d2438546309..20f57d0286dde7dbebdfe87c3e7d496e2863595f 100644 GIT binary patch delta 411 zcmdlX*Q2%b z5l{!{(3brD_8i7&uCR9ul4G!s*CwUEH(9Xxj&%*ae`N(B>9S1x5jf z<6`<-WL7i-MR$NzF5yzt=f3dhknVPW1_n+QpqPqVd)4;#%!nuk26hb~U(3^E*+&LP z6E~oqC18`Ta2;Ue>G^N;vpMhv$fTal6L>Uc8w1D_icrw0Ii629pG delta 70 zcmV-M0J;B+A-Eo}bO@733DA=$3PH1Z3LgQJs0$$vhkCb%X;@kS00$@l001hp_zS=R cv&aol0u1cLWHNMj5qtmu1{{+_5JmzBbUbAh(EtDd diff --git a/files/luci/i18n/shadowsocksr.zh-cn.po b/files/luci/i18n/shadowsocksr.zh-cn.po index 79afe8f..1c1399a 100644 --- a/files/luci/i18n/shadowsocksr.zh-cn.po +++ b/files/luci/i18n/shadowsocksr.zh-cn.po @@ -325,3 +325,27 @@ msgstr "使用DNS隧道" msgid "Use Pdnsd" msgstr "使用Pdnsd" + +msgid "Import SSR" +msgstr "导入ssr配置信息" + +msgid "Export SSR" +msgstr "导出ssr配置信息" + +msgid "Import SSR successfully." +msgstr "成功导入SSR。" + +msgid "Invalid SSR format." +msgstr "无效的SSR格式。" + +msgid "User cancelled." +msgstr "用户已取消。" + +msgid "Paste ssr url here" +msgstr "在此处粘贴ssr://网址" + +msgid "Unable to copy SSR to clipboard." +msgstr "无法复制SSR网址到剪贴板。" + +msgid "Copy SSR to clipboard successfully." +msgstr "成功复制SSR网址到剪贴板。" diff --git a/files/luci/model/cbi/shadowsocksr/client-config.lua b/files/luci/model/cbi/shadowsocksr/client-config.lua index c1ae48a..13d55aa 100644 --- a/files/luci/model/cbi/shadowsocksr/client-config.lua +++ b/files/luci/model/cbi/shadowsocksr/client-config.lua @@ -153,4 +153,9 @@ o = s:option(Value, "kcp_param", translate("KcpTun Param")) o.default = "--nocomp" +o = s:option(DummyValue,"ssr_url","SSR URL") +o.rawhtml = true +o.template = "shadowsocksr/ssrurl" +o.value =sid + return m diff --git a/files/luci/view/shadowsocksr/ssrurl.htm b/files/luci/view/shadowsocksr/ssrurl.htm new file mode 100644 index 0000000..6bcc8bb --- /dev/null +++ b/files/luci/view/shadowsocksr/ssrurl.htm @@ -0,0 +1,139 @@ +<%+cbi/valueheader%> + + + + + +<%:ssr://%> + +<%+cbi/valuefooter%> From c534e54cfeec0284f664c95aebc633e529f22c8b Mon Sep 17 00:00:00 2001 From: Zero One Date: Thu, 2 Nov 2017 05:59:07 +0800 Subject: [PATCH 15/18] update protocol auth_chain_c-f --- Makefile | 10 +++++----- files/luci/model/cbi/shadowsocksr/client-config.lua | 4 ++++ files/luci/model/cbi/shadowsocksr/client.lua | 4 ++++ files/shadowsocksr.init | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5986a9d..bf9ec9a 100644 --- a/Makefile +++ b/Makefile @@ -9,19 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr -PKG_VERSION:=3.0.7 -PKG_RELEASE:=2 +PKG_VERSION:=3.0.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/shadowsocksr-backup/shadowsocksr-libev.git -PKG_SOURCE_VERSION:=e2373d7199102f383b741da148b989c7c1e8832e +PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev.git +PKG_SOURCE_VERSION:=d4904568c0bd7e0861c0cbfeaa43740f404db214 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=breakwa11 +PKG_MAINTAINER:=Akkariiin #PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/files/luci/model/cbi/shadowsocksr/client-config.lua b/files/luci/model/cbi/shadowsocksr/client-config.lua index 13d55aa..eb1ef32 100644 --- a/files/luci/model/cbi/shadowsocksr/client-config.lua +++ b/files/luci/model/cbi/shadowsocksr/client-config.lua @@ -54,6 +54,10 @@ local protocol = { "auth_aes128_md5", "auth_chain_a", "auth_chain_b", + "auth_chain_c", + "auth_chain_d", + "auth_chain_e", + "auth_chain_f", } obfs = { diff --git a/files/luci/model/cbi/shadowsocksr/client.lua b/files/luci/model/cbi/shadowsocksr/client.lua index 50c5ebc..300f6c2 100644 --- a/files/luci/model/cbi/shadowsocksr/client.lua +++ b/files/luci/model/cbi/shadowsocksr/client.lua @@ -57,6 +57,10 @@ local protocol = { "auth_aes128_md5", "auth_chain_a", "auth_chain_b", + "auth_chain_c", + "auth_chain_d", + "auth_chain_e", + "auth_chain_f", } obfs = { diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index 1602f16..aec8852 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -27,7 +27,7 @@ gfw_enable=0 dns_enable_flag=0 switch_enable=0 switch_server=$1 - +MAXFD=32768 uci_get_by_name() { local ret=$(uci get $NAME.$1.$2 2>/dev/null) From d4c8d9d8f980c4ff7a75e2c4a91776f19214a877 Mon Sep 17 00:00:00 2001 From: Zero One Date: Sat, 14 Mar 2020 11:33:08 +0800 Subject: [PATCH 16/18] add mtu option --- files/luci/model/cbi/shadowsocksr/client.lua | 4 ++++ files/shadowsocksr.init | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/files/luci/model/cbi/shadowsocksr/client.lua b/files/luci/model/cbi/shadowsocksr/client.lua index 300f6c2..fec3255 100644 --- a/files/luci/model/cbi/shadowsocksr/client.lua +++ b/files/luci/model/cbi/shadowsocksr/client.lua @@ -204,6 +204,10 @@ o = s:option(Value, "tunnel_forward", translate("DNS Server IP and Port")) o.default = "8.8.4.4:53" o.rmempty = false +o = s:option(Value, "mtu_value", "MTU") +o.default = "1492" +o.rmempty = false + -- [[ SOCKS5 Proxy ]]-- s = m:section(TypedSection, "socks5_proxy", translate("SOCKS5 Proxy")) s.anonymous = true diff --git a/files/shadowsocksr.init b/files/shadowsocksr.init index aec8852..117e27e 100644 --- a/files/shadowsocksr.init +++ b/files/shadowsocksr.init @@ -69,6 +69,10 @@ gen_config_file() { else fastopen="false"; fi + mtuval=$(uci_get_by_type global mtu_value) + if [ -z $mtuval ] ;then + mtuval="1492" + fi cat <<-EOF >$config_file { @@ -83,7 +87,8 @@ gen_config_file() { "protocol_param": "$(uci_get_by_name $1 protocol_param)", "obfs": "$(uci_get_by_name $1 obfs)", "obfs_param": "$(uci_get_by_name $1 obfs_param)", - "fast_open": $fastopen + "fast_open": $fastopen , + "mtu": $mtuval } EOF } @@ -301,7 +306,11 @@ gen_service_file() { fastopen="true"; else fastopen="false"; - fi + fi + mtuval=$(uci_get_by_type global mtu_value) + if [ -z $mtuval ] ;then + mtuval="1492" + fi cat <<-EOF >$2 { "server": "$(uci_get_by_name $1 server)", @@ -313,7 +322,8 @@ gen_service_file() { "protocol_param": "$(uci_get_by_name $1 protocol_param)", "obfs": "$(uci_get_by_name $1 obfs)", "obfs_param": "$(uci_get_by_name $1 obfs_param)", - "fast_open": $fastopen + "fast_open": $fastopen, + "mtu": $mtuval } EOF } From 0f691848e6db6acb0e2f15e5da71b2d9102bb96b Mon Sep 17 00:00:00 2001 From: lededev Date: Fri, 1 May 2020 19:44:53 +0800 Subject: [PATCH 17/18] acl --- Makefile | 2 +- .../rpcd/acl.d/luci-app-shadowsocksr.json | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json diff --git a/Makefile b/Makefile index bf9ec9a..2521593 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr PKG_VERSION:=3.0.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev.git diff --git a/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json b/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json new file mode 100644 index 0000000..3ec0be0 --- /dev/null +++ b/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json @@ -0,0 +1,20 @@ +{ + "luci-app-shadowsocksr": { + "description": "Grant access to ShadowsocksR", + "read": { + "file": { + "/etc/china_ssr.txt": [ "read" ], + "/etc/dnsmasq.ssr/*": [ "read" ] + }, + "uci": [ "dhcp", "firewall", "shadowsocksr" ] + }, + "write": { + "file": { + "/etc/china_ssr.txt": [ "write" ], + "/etc/dnsmasq.ssr/*": [ "write" ], + "/usr/bin/ssr-*": [ "exec" ] + }, + "uci": [ "dhcp", "firewall", "shadowsocksr" ] + } + } +} From eb3c4b3dfd16265a6f3f8b0dd341440fd299fbe9 Mon Sep 17 00:00:00 2001 From: lededev Date: Fri, 1 May 2020 21:13:54 +0800 Subject: [PATCH 18/18] makefile install acl --- Makefile | 6 ++++-- files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2521593..e891ee7 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-ssr PKG_VERSION:=3.0.8 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev.git @@ -38,7 +38,7 @@ define Package/openwrt-ssr/Default CATEGORY:=LuCI SUBMENU:=3. Applications TITLE:=shadowsocksR-libev LuCI interface - URL:=https://github.com/nobk/openwrt-ssr + URL:=https://github.com/lededev/openwrt-ssr VARIANT:=$(1) DEPENDS:=$(3) PKGARCH:=all @@ -152,6 +152,8 @@ define Install/common $(INSTALL_DATA) ./files/shadowsocksr.config $(1)/etc/config/shadowsocksr $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/shadowsocksr.init $(1)/etc/init.d/shadowsocksr + $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d + $(INSTALL_DATA) ./files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json $(1)/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json endef define Package/openwrt-ssr/install diff --git a/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json b/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json index 3ec0be0..2c441c4 100644 --- a/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json +++ b/files/root/usr/share/rpcd/acl.d/luci-app-shadowsocksr.json @@ -4,7 +4,8 @@ "read": { "file": { "/etc/china_ssr.txt": [ "read" ], - "/etc/dnsmasq.ssr/*": [ "read" ] + "/etc/dnsmasq.ssr/*": [ "read" ], + "/var/etc/shadowsocksr.include": [ "read" ] }, "uci": [ "dhcp", "firewall", "shadowsocksr" ] }, @@ -12,6 +13,7 @@ "file": { "/etc/china_ssr.txt": [ "write" ], "/etc/dnsmasq.ssr/*": [ "write" ], + "/var/etc/shadowsocksr.include": [ "write" ], "/usr/bin/ssr-*": [ "exec" ] }, "uci": [ "dhcp", "firewall", "shadowsocksr" ]