mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-03 20:49:02 +01:00
Add support for PfSense
PfSense is based on FreeBSD and its pf is pretty close to the one FreeBSD ships, however some structures have different fields and two offsets had to be fixed.
This commit is contained in:
parent
e39c4afce0
commit
e8ceccc3d5
@ -1,5 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
import re
|
||||
import socket
|
||||
import struct
|
||||
@ -335,10 +336,20 @@ class Darwin(FreeBsd):
|
||||
return xport.port
|
||||
|
||||
|
||||
class PfSense(FreeBsd):
|
||||
RULE_ACTION_OFFSET = 3040
|
||||
|
||||
def __init__(self):
|
||||
self.pfioc_rule = c_char * 3112
|
||||
super(PfSense, self).__init__()
|
||||
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
pf = Darwin()
|
||||
elif sys.platform.startswith('openbsd'):
|
||||
pf = OpenBsd()
|
||||
elif platform.version().endswith('pfSense'):
|
||||
pf = PfSense()
|
||||
else:
|
||||
pf = FreeBsd()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user