@@ -281,30 +281,35 @@ def __apply_config(self):
281
281
try :
282
282
if ("interface_enabled" in c ) and c .as_bool ("interface_enabled" ) == True :
283
283
if c ["type" ] == "AutoInterface" :
284
- group_id = c ["group_id" ] if "group_id" in c else None
285
- discovery_scope = c ["discovery_scope" ] if "discovery_scope" in c else None
286
- discovery_port = int (c ["discovery_port" ]) if "discovery_port" in c else None
287
- data_port = int (c ["data_port" ]) if "data_port" in c else None
288
- allowed_interfaces = c .as_list ("devices" ) if "devices" in c else None
289
- ignored_interfaces = c .as_list ("ignored_devices" ) if "ignored_devices" in c else None
290
-
291
- interface = AutoInterface .AutoInterface (
292
- RNS .Transport ,
293
- name ,
294
- group_id ,
295
- discovery_scope ,
296
- discovery_port ,
297
- data_port ,
298
- allowed_interfaces ,
299
- ignored_interfaces
300
- )
301
-
302
- if "outgoing" in c and c .as_bool ("outgoing" ) == True :
303
- interface .OUT = True
284
+ if not RNS .vendor .platformutils .is_windows ():
285
+ group_id = c ["group_id" ] if "group_id" in c else None
286
+ discovery_scope = c ["discovery_scope" ] if "discovery_scope" in c else None
287
+ discovery_port = int (c ["discovery_port" ]) if "discovery_port" in c else None
288
+ data_port = int (c ["data_port" ]) if "data_port" in c else None
289
+ allowed_interfaces = c .as_list ("devices" ) if "devices" in c else None
290
+ ignored_interfaces = c .as_list ("ignored_devices" ) if "ignored_devices" in c else None
291
+
292
+ interface = AutoInterface .AutoInterface (
293
+ RNS .Transport ,
294
+ name ,
295
+ group_id ,
296
+ discovery_scope ,
297
+ discovery_port ,
298
+ data_port ,
299
+ allowed_interfaces ,
300
+ ignored_interfaces
301
+ )
302
+
303
+ if "outgoing" in c and c .as_bool ("outgoing" ) == True :
304
+ interface .OUT = True
305
+ else :
306
+ interface .OUT = False
307
+
308
+ RNS .Transport .interfaces .append (interface )
304
309
else :
305
- interface . OUT = False
306
-
307
- RNS .Transport . interfaces . append ( interface )
310
+ RNS . log ( "AutoInterface is not currently supported on Windows, disabling interface." , RNS . LOG_ERROR );
311
+ RNS . log ( "Please remove this AutoInterface instance from your configuration file." , RNS . LOG_ERROR );
312
+ RNS .log ( "You will have to manually configure other interfaces for connectivity." , RNS . LOG_ERROR );
308
313
309
314
310
315
if c ["type" ] == "UDPInterface" :
@@ -536,6 +541,8 @@ def __apply_config(self):
536
541
except Exception as e :
537
542
RNS .log ("The interface \" " + name + "\" could not be created. Check your configuration file for errors!" , RNS .LOG_ERROR )
538
543
RNS .log ("The contained exception was: " + str (e ), RNS .LOG_ERROR )
544
+ # TODO: Remove
545
+ raise e
539
546
RNS .panic ()
540
547
else :
541
548
RNS .log ("The interface name \" " + name + "\" was already used. Check your configuration file for errors!" , RNS .LOG_ERROR )
0 commit comments