diff options
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/htdocs/luci-static/resources/shadowsocks-libev.js')
-rw-r--r-- | applications/luci-app-shadowsocks-libev/htdocs/luci-static/resources/shadowsocks-libev.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/applications/luci-app-shadowsocks-libev/htdocs/luci-static/resources/shadowsocks-libev.js b/applications/luci-app-shadowsocks-libev/htdocs/luci-static/resources/shadowsocks-libev.js index ef93a1c754..c0f1ced553 100644 --- a/applications/luci-app-shadowsocks-libev/htdocs/luci-static/resources/shadowsocks-libev.js +++ b/applications/luci-app-shadowsocks-libev/htdocs/luci-static/resources/shadowsocks-libev.js @@ -21,6 +21,7 @@ var names_options_client = [ ]; var names_options_common = [ + 'local_address', 'verbose', 'ipv6_first', 'fast_open', @@ -100,7 +101,7 @@ return baseclass.extend({ } }); }, - values_ipaddr: function(o, netDevs) { + values_ip4addr: function(o, netDevs) { netDevs.forEach(function(v) { v.getIPAddrs().forEach(function(a) { var host = a.split('/')[0]; @@ -108,6 +109,18 @@ return baseclass.extend({ }); }); }, + values_ip6addr: function(o, netDevs) { + netDevs.forEach(function(v) { + v.getIP6Addrs().forEach(function(a) { + var host = a.split('/')[0]; + o.value(host, '%s (%s)'.format(host, v.getShortName())); + }); + }); + }, + values_ipaddr: function(o, netDevs) { + this.values_ip4addr(o, netDevs) + this.values_ip6addr(o, netDevs) + }, options_client: function(s, tab, netDevs) { var o = s.taboption(tab, form.ListValue, 'server', _('Remote server')); this.values_serverlist(o); @@ -191,7 +204,7 @@ return baseclass.extend({ if (stype === 'ss_server') { this.cfgvalue_overview_(sdata, lines, names_options_server); this.cfgvalue_overview_(sdata, lines, names_options_common); - this.cfgvalue_overview_(sdata, lines, ['bind_address']); + this.cfgvalue_overview_(sdata, lines, ['local_ipv4_address', 'local_ipv6_address']); } else if (stype === 'ss_local' || stype === 'ss_redir' || stype === 'ss_tunnel') { this.cfgvalue_overview_(sdata, lines, names_options_client); if (stype === 'ss_tunnel') { |