Skip to content

Commit c8c0cef

Browse files
committed
可忽略json配置,使用默认值
1 parent 49f73ed commit c8c0cef

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/config.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ namespace hcpp
1616
// dns mapping config
1717
struct host_mapping
1818
{
19-
std::string host_;
20-
std::string port_;
21-
std::vector<std::string> ips_;
19+
std::string host_ = "localhost";
20+
std::string port_ = "8080";
21+
std::vector<std::string> ips_ = {"127.0.0.1"};
2222

2323
JS_OBJECT(JS_MEMBER(host_), JS_MEMBER(port_), JS_MEMBER(ips_));
2424
};
2525

2626
struct dns_provider
2727
{
28-
std::string provider_;
29-
std::string host_;
28+
std::string provider_ = "localhost";
29+
std::string host_ = "127.0.0.1";
3030

3131
JS_OBJECT(JS_MEMBER(provider_), JS_MEMBER(host_));
3232
};

0 commit comments

Comments
 (0)