mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-28 19:53:46 +00:00
server_port in json file should be integer (#1520)
* Fix #1518 config file with wrong json format Removing trailing "," to make the configuration file compliant with JSON specification * Remove extra "," in json file * server_port should be integer instead of string server_port in generated json configuration file should be integer instead of string
This commit is contained in:
+1
-1
@@ -109,7 +109,7 @@ build_config(char *prefix, struct server *server)
|
||||
return;
|
||||
}
|
||||
fprintf(f, "{\n");
|
||||
fprintf(f, "\"server_port\":\"%s\",\n", server->port);
|
||||
fprintf(f, "\"server_port\":%d,\n", atoi(server->port));
|
||||
fprintf(f, "\"password\":\"%s\"", server->password);
|
||||
if (server->fast_open[0]) fprintf(f, ",\n\"fast_open\": %s", server->fast_open);
|
||||
if (server->mode) fprintf(f, ",\n\"mode\":\"%s\"", server->mode);
|
||||
|
||||
Reference in New Issue
Block a user