mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
+ Use sys.platform.startswith("freebsd") instead of matching just freebsd10.
+ This means support for any freebsd version (note that I only tested 11-CURRENT and 9)
This commit is contained in:
parent
1c5277b21f
commit
b942f98f37
@ -8,7 +8,7 @@ if sys.platform == "linux2":
|
|||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
from . import osx
|
from . import osx
|
||||||
resolver = osx.Resolver
|
resolver = osx.Resolver
|
||||||
elif sys.platform == "freebsd10":
|
elif sys.platform.startswith("freebsd"):
|
||||||
from . import osx
|
from . import osx
|
||||||
resolver = osx.Resolver
|
resolver = osx.Resolver
|
||||||
elif sys.platform == "win32":
|
elif sys.platform == "win32":
|
||||||
|
@ -13,7 +13,7 @@ def lookup(address, port, s):
|
|||||||
if "ESTABLISHED:ESTABLISHED" in i and spec in i:
|
if "ESTABLISHED:ESTABLISHED" in i and spec in i:
|
||||||
s = i.split()
|
s = i.split()
|
||||||
if len(s) > 4:
|
if len(s) > 4:
|
||||||
if sys.platform == "freebsd10":
|
if sys.platform.startswith("freebsd"):
|
||||||
# strip parentheses for FreeBSD pfctl
|
# strip parentheses for FreeBSD pfctl
|
||||||
s = s[3][1:-1].split(":")
|
s = s[3][1:-1].split(":")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user