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 b2da5df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions root/etc/homeproxy/scripts/generate_client.uc
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,14 @@ function get_outbound(cfg) {

if (type(cfg) === 'array') {
let outbounds = [];
for (let i in cfg)
for (let i in cfg) {
if (i === 'any')
return 'any';
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 b2da5df

Please sign in to comment.