Skip to content

Commit

Permalink
chore(generator/client): fix parse any outbound
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
  • Loading branch information
1715173329 committed Nov 20, 2023
1 parent af8aba0 commit 33aa7c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion htdocs/luci-static/resources/view/homeproxy/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ return view.extend({
delete this.keylist;
delete this.vallist;

this.value('any', _('Any'));
this.value('any-out', _('Any'));
this.value('direct-out', _('Direct'));
this.value('block-out', _('Block'));
uci.sections(data[0], 'routing_node', (res) => {
Expand Down
5 changes: 4 additions & 1 deletion root/etc/homeproxy/scripts/generate_client.uc
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,15 @@ function get_outbound(cfg) {
return null;

if (type(cfg) === 'array') {
if ('any-out' in cfg)
return 'any';

let outbounds = [];
for (let i in cfg)
push(outbounds, get_outbound(i));
return outbounds;
} else {
if (cfg in ['any', 'direct-out', 'block-out']) {
if (cfg in ['direct-out', 'block-out']) {
return cfg;
} else {
const node = uci.get(uciconfig, cfg, 'node');
Expand Down

0 comments on commit 33aa7c4

Please sign in to comment.