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 18edc0b
Showing 1 changed file with 4 additions and 1 deletion.
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' 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 18edc0b

Please sign in to comment.