mirror of
https://github.com/meshtastic/python.git
synced 2026-08-01 17:47:24 -04:00
1.1.31 bury taptun2 deeper so that windows can't accidentally touch it
This commit is contained in:
@@ -11,8 +11,6 @@ import pkg_resources
|
||||
|
||||
"""We only import the tunnel code if we are on a platform that can run it"""
|
||||
have_tunnel = platform.system() == 'Linux'
|
||||
if have_tunnel:
|
||||
from . import tunnel
|
||||
|
||||
"""The command line arguments"""
|
||||
args = None
|
||||
@@ -279,6 +277,7 @@ def onConnected(interface):
|
||||
print(url.terminal())
|
||||
|
||||
if have_tunnel and args.tunnel :
|
||||
from . import tunnel
|
||||
closeNow = False # Even if others said we could close, stay open if the user asked for a tunnel
|
||||
tunnel.Tunnel(interface, subnet=args.tunnel_net)
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
from . import portnums_pb2
|
||||
from pubsub import pub
|
||||
from pytap2 import TapDevice
|
||||
import logging, threading
|
||||
|
||||
# A new non standard log level that is lower level than DEBUG
|
||||
@@ -90,6 +89,7 @@ class Tunnel:
|
||||
|
||||
logging.debug("creating TUN device")
|
||||
# FIXME - figure out real max MTU, it should be 240 - the overhead bytes for SubPacket and Data
|
||||
from pytap2 import TapDevice
|
||||
self.tun = TapDevice(name="mesh", mtu=200)
|
||||
self.tun.up()
|
||||
self.tun.ifconfig(address=myAddr,netmask=netmask)
|
||||
|
||||
Reference in New Issue
Block a user