luci: support proxy server settings.

This commit is contained in:
Nick Peng
2023-01-08 22:33:54 +08:00
parent 5392857539
commit ee4816da5c
8 changed files with 132 additions and 5 deletions

View File

@@ -1638,13 +1638,13 @@ static int _config_proxy_server(void *data, int argc, char *argv[])
server = malloc(sizeof(*server));
if (server == NULL) {
tlog(TLOG_WARN, "malloc memory failed.");
return -1;
goto errout;
}
memset(server, 0, sizeof(*server));
ip = argv[1];
if (parse_uri_ext(ip, scheme, server->username, server->password, server->server, &port, NULL) != 0) {
return -1;
goto errout;
}
/* process extra options */