dashboardwireguard-tunnelwireguard-dashboardwireguardwg-managervpnsite-to-siteobfuscationwireguard-vpn-setupwireguard-vpn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
727 B
30 lines
727 B
from script.obfuscate import BaseObfuscation
|
|
import re
|
|
|
|
|
|
class ObfuscateOBFS4(BaseObfuscation):
|
|
|
|
def __init__(self):
|
|
super().__init__(
|
|
binary_name="obfs4proxy",
|
|
binary_path="/usr/bin/obfs4proxy",
|
|
algorithm="obfs4"
|
|
)
|
|
|
|
self.ensure_installed()
|
|
|
|
def ensure_installed(self):
|
|
super().ensure_installed()
|
|
|
|
output, code = self.execute("-version")
|
|
|
|
if re.match(f'{self.binary_name}-[0-9]+.[0-9]+.[0-9]+', output) and code == 0:
|
|
return True
|
|
else:
|
|
raise RuntimeError(f"Could not verify that {self.binary_name} is installed correctly.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
x = ObfuscateOBFS4()
|
|
x.ensure_installed()
|