From a43d485630ee5303fb62fd5433d6b6a2b8581b3e Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 13 Aug 2020 12:37:54 +0200 Subject: [PATCH] Renamed UDPInterface --- RNS/Interfaces/{UdpInterface.py => UDPInterface.py} | 8 ++++---- RNS/Reticulum.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) rename RNS/Interfaces/{UdpInterface.py => UDPInterface.py} (87%) mode change 100755 => 100644 diff --git a/RNS/Interfaces/UdpInterface.py b/RNS/Interfaces/UDPInterface.py old mode 100755 new mode 100644 similarity index 87% rename from RNS/Interfaces/UdpInterface.py rename to RNS/Interfaces/UDPInterface.py index 3373d82..622b43f --- a/RNS/Interfaces/UdpInterface.py +++ b/RNS/Interfaces/UDPInterface.py @@ -6,7 +6,7 @@ import time import sys import RNS -class UdpInterface(Interface): +class UDPInterface(Interface): def __init__(self, owner, name, bindip=None, bindport=None, forwardip=None, forwardport=None): self.IN = True @@ -20,7 +20,7 @@ class UdpInterface(Interface): def handlerFactory(callback): def createHandler(*args, **keys): - return UdpInterfaceHandler(callback, *args, **keys) + return UDPInterfaceHandler(callback, *args, **keys) return createHandler self.owner = owner @@ -47,9 +47,9 @@ class UdpInterface(Interface): def __str__(self): - return "UdpInterface["+self.name+"/"+self.bind_ip+":"+str(self.bind_port)+"]" + return "UDPInterface["+self.name+"/"+self.bind_ip+":"+str(self.bind_port)+"]" -class UdpInterfaceHandler(socketserver.BaseRequestHandler): +class UDPInterfaceHandler(socketserver.BaseRequestHandler): def __init__(self, callback, *args, **keys): self.callback = callback socketserver.BaseRequestHandler.__init__(self, *args, **keys) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 60544c2..21e844f 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -168,8 +168,8 @@ class Reticulum: try: if ("interface_enabled" in c) and c.as_bool("interface_enabled") == True: - if c["type"] == "UdpInterface": - interface = UdpInterface.UdpInterface( + if c["type"] == "UDPInterface": + interface = UDPInterface.UDPInterface( RNS.Transport, name, c["listen_ip"], @@ -467,7 +467,7 @@ loglevel = 4 # needs or turn it off completely. [[Default UDP Interface]] - type = UdpInterface + type = UDPInterface interface_enabled = True outgoing = True listen_ip = 0.0.0.0