File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 87
87
}
88
88
}
89
89
90
+ fn webserver_default_bind ( ) -> Option < String > {
91
+ Some ( "0.0.0.0:80" . into ( ) )
92
+ }
93
+
90
94
#[ derive( Debug , Clone , Deserialize , Serialize ) ]
91
95
#[ serde( default ) ]
92
96
pub struct AppConfig {
@@ -107,7 +111,10 @@ pub struct AppConfig {
107
111
pub btalias : Option < String > ,
108
112
pub keepalive : bool ,
109
113
pub timeout_secs : u16 ,
110
- #[ serde( default , deserialize_with = "empty_string_as_none" ) ]
114
+ #[ serde(
115
+ default = "webserver_default_bind" ,
116
+ deserialize_with = "empty_string_as_none"
117
+ ) ]
111
118
pub webserver : Option < String > ,
112
119
pub bt_timeout_secs : u16 ,
113
120
pub mitm : bool ,
@@ -144,7 +151,7 @@ impl Default for AppConfig {
144
151
btalias : None ,
145
152
keepalive : false ,
146
153
timeout_secs : 10 ,
147
- webserver : Some ( "0.0.0.0:80" . into ( ) ) ,
154
+ webserver : webserver_default_bind ( ) ,
148
155
bt_timeout_secs : 120 ,
149
156
mitm : false ,
150
157
dpi : 0 ,
You can’t perform that action at this time.
0 commit comments