From 3f023d5af8eb7a1c30ac1a8229b6fb5b2046c9ab Mon Sep 17 00:00:00 2001 From: Dengfeng Liu Date: Fri, 14 Oct 2022 08:36:16 +0000 Subject: [PATCH] xfrpc: allow server_addr ip and domain Signed-off-by: Dengfeng Liu (cherry picked from commit a7e3f28c3761de6e7eed5423fbd116eeeec38491) --- net/xfrpc/files/xfrpc.init | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/xfrpc/files/xfrpc.init b/net/xfrpc/files/xfrpc.init index aa999bc68a..3b0ddedafc 100755 --- a/net/xfrpc/files/xfrpc.init +++ b/net/xfrpc/files/xfrpc.init @@ -34,14 +34,16 @@ handle_xfrpc() { ;; http|https) config_get custom_domains "$name" custom_domains - echo "custom_domains = $custom_domains" >> "$config" + [ -z "$custom_domains" ] || echo "custom_domains = $custom_domains" >> "$config" + config_get subdomain "$name" subdomain + [ -z "$subdomain" ] || echo "subdomain = $subdomain" >> "$config" ;; esac } if [ "$name" = "common" ]; then uci_validate_section xfrpc xfrp "$name" \ - 'server_addr:ipaddr' \ + 'server_addr:host' \ 'server_port:uinteger' \ 'token:string:' -- 2.30.2