File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 9
9
# Data transfer timeout [seconds], after this idle time the session will be reconnected
10
10
timeout_secs = 10
11
11
12
+ # Webserver bind address/port, empty = disabled
13
+ webserver = " 0.0.0.0:80"
14
+
12
15
# Enable legacy USB mode (some HeadUnits/cars needs this enabled for compatibility)
13
16
legacy = true
14
17
Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ pub struct AppConfig {
107
107
pub btalias : Option < String > ,
108
108
pub keepalive : bool ,
109
109
pub timeout_secs : u16 ,
110
+ #[ serde( default , deserialize_with = "empty_string_as_none" ) ]
111
+ pub webserver : Option < String > ,
110
112
pub bt_timeout_secs : u16 ,
111
113
pub mitm : bool ,
112
114
pub dpi : u16 ,
@@ -142,6 +144,7 @@ impl Default for AppConfig {
142
144
btalias : None ,
143
145
keepalive : false ,
144
146
timeout_secs : 10 ,
147
+ webserver : Some ( "0.0.0.0:80" . into ( ) ) ,
145
148
bt_timeout_secs : 120 ,
146
149
mitm : false ,
147
150
dpi : 0 ,
@@ -201,6 +204,9 @@ impl AppConfig {
201
204
}
202
205
doc[ "keepalive" ] = value ( self . keepalive ) ;
203
206
doc[ "timeout_secs" ] = value ( self . timeout_secs as i64 ) ;
207
+ if let Some ( webserver) = & self . webserver {
208
+ doc[ "webserver" ] = value ( webserver) ;
209
+ }
204
210
doc[ "bt_timeout_secs" ] = value ( self . bt_timeout_secs as i64 ) ;
205
211
doc[ "mitm" ] = value ( self . mitm ) ;
206
212
doc[ "dpi" ] = value ( self . dpi as i64 ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ <h3>🛸 aa-proxy-rs configuration</h3>
51
51
>
52
52
</ td >
53
53
</ tr >
54
+ < tr >
55
+ < td > < label for ="webserver "> webserver</ label > </ td >
56
+ < td >
57
+ < input type ="text " id ="webserver " /> < br /> < small >
58
+ Webserver bind address/port, empty = disabled</ small
59
+ >
60
+ </ td >
61
+ </ tr >
54
62
< tr >
55
63
< td > < label for ="legacy "> legacy</ label > </ td >
56
64
< td >
@@ -344,6 +352,7 @@ <h3>🛸 aa-proxy-rs configuration</h3>
344
352
"hostapd_conf" ,
345
353
"btalias" ,
346
354
"keepalive" ,
355
+ "webserver" ,
347
356
"timeout_secs" ,
348
357
"bt_timeout_secs" ,
349
358
"mitm" ,
You can’t perform that action at this time.
0 commit comments