()
| 112 | |
| 113 | |
| 114 | def get_auto_method(): |
| 115 | debug3("Selecting a method automatically...") |
| 116 | # Try these methods, in order: |
| 117 | methods_to_try = ["nat", "nft", "pf", "ipfw"] if sys.platform != "win32" else ["windivert"] |
| 118 | for m in methods_to_try: |
| 119 | method = get_method(m) |
| 120 | if method.is_supported(): |
| 121 | debug3("Method '%s' was automatically selected." % m) |
| 122 | return method |
| 123 | |
| 124 | raise Fatal("Unable to automatically find a supported method. Check that " |
| 125 | "the appropriate programs are in your PATH. We tried " |
| 126 | "methods: %s" % str(methods_to_try)) |
no test coverage detected