mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
Merge pull request #569 from mike-pt/master
Match all freebsd versions and not just freebsd10
This commit is contained in:
commit
90dff4a8a1
@ -8,9 +8,9 @@ if sys.platform == "linux2":
|
||||
elif sys.platform == "darwin":
|
||||
from . import osx
|
||||
resolver = osx.Resolver
|
||||
elif sys.platform == "freebsd10":
|
||||
elif sys.platform.startswith("freebsd"):
|
||||
from . import osx
|
||||
resolver = osx.Resolver
|
||||
elif sys.platform == "win32":
|
||||
from . import windows
|
||||
resolver = windows.Resolver
|
||||
resolver = windows.Resolver
|
||||
|
@ -13,7 +13,7 @@ def lookup(address, port, s):
|
||||
if "ESTABLISHED:ESTABLISHED" in i and spec in i:
|
||||
s = i.split()
|
||||
if len(s) > 4:
|
||||
if sys.platform == "freebsd10":
|
||||
if sys.platform.startswith("freebsd"):
|
||||
# strip parentheses for FreeBSD pfctl
|
||||
s = s[3][1:-1].split(":")
|
||||
else:
|
||||
@ -21,4 +21,4 @@ def lookup(address, port, s):
|
||||
|
||||
if len(s) == 2:
|
||||
return s[0], int(s[1])
|
||||
raise RuntimeError("Could not resolve original destination.")
|
||||
raise RuntimeError("Could not resolve original destination.")
|
||||
|
Loading…
Reference in New Issue
Block a user