mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
only support FreeBSD 10+
This commit is contained in:
parent
2704963e61
commit
e601ade924
@ -7,6 +7,6 @@ if sys.platform == "linux2":
|
|||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
import osx
|
import osx
|
||||||
resolver = osx.Resolver
|
resolver = osx.Resolver
|
||||||
elif "freebsd" in sys.platform:
|
elif sys.platform == "freebsd10":
|
||||||
import osx
|
import osx
|
||||||
resolver = osx.Resolver
|
resolver = osx.Resolver
|
||||||
|
@ -12,7 +12,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 "freebsd" in sys.platform:
|
if sys.platform == "freebsd10":
|
||||||
# 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