diff --git a/libmproxy/platform/__init__.py b/libmproxy/platform/__init__.py index 79f2f5dfc..7f5701336 100644 --- a/libmproxy/platform/__init__.py +++ b/libmproxy/platform/__init__.py @@ -7,6 +7,6 @@ if sys.platform == "linux2": elif sys.platform == "darwin": import osx resolver = osx.Resolver -elif "freebsd" in sys.platform: +elif sys.platform == "freebsd10": import osx resolver = osx.Resolver diff --git a/libmproxy/platform/pf.py b/libmproxy/platform/pf.py index 32529e592..dc0f61046 100644 --- a/libmproxy/platform/pf.py +++ b/libmproxy/platform/pf.py @@ -12,7 +12,7 @@ def lookup(address, port, s): if "ESTABLISHED:ESTABLISHED" in i and spec in i: s = i.split() if len(s) > 4: - if "freebsd" in sys.platform: + if sys.platform == "freebsd10": # strip parentheses for FreeBSD pfctl s = s[3][1:-1].split(":") else: