summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxb <bittmanmax@gmail.com>2022-12-30 18:56:36 -0800
committerMaxb <bittmanmax@gmail.com>2023-02-28 14:03:12 -0800
commit596ba0495699578299879ad841c74152ffb8b94f (patch)
tree751d8464a4cc7a58ceac82ff6c791a1704804c0c
parente7660f3067eec0ae5201c7be418ccafec370fec7 (diff)
Rename shapeshifter files to obfs4
We're migrating to obfs4 so discontinuing the specific use of "shapeshifter" to refer to obfs4 files will make for a more understandable separation.
-rw-r--r--config/roles/openvpn/tasks/shapeshifter.yml4
-rw-r--r--config/roles/simplevpn/tasks/main.yml2
-rw-r--r--playbooks/init-credentials.yml12
-rwxr-xr-xplaybooks/scripts/gen-obfs4-state.py (renamed from playbooks/scripts/gen-shapeshifter-state.py)5
4 files changed, 11 insertions, 12 deletions
diff --git a/config/roles/openvpn/tasks/shapeshifter.yml b/config/roles/openvpn/tasks/shapeshifter.yml
index 6afdfc9..4feb362 100644
--- a/config/roles/openvpn/tasks/shapeshifter.yml
+++ b/config/roles/openvpn/tasks/shapeshifter.yml
@@ -1,7 +1,7 @@
# this is a recursive copy
-- name: Install shapeshifter state
+- name: Install obfs4 state
copy:
- src: "{{ credentials_dir }}/shapeshifter/"
+ src: "{{ credentials_dir }}/obfs4/"
dest: "/srv/leap/shapeshifter-state"
owner: docker-openvpn
mode: 0600
diff --git a/config/roles/simplevpn/tasks/main.yml b/config/roles/simplevpn/tasks/main.yml
index 4bfd953..4aaea65 100644
--- a/config/roles/simplevpn/tasks/main.yml
+++ b/config/roles/simplevpn/tasks/main.yml
@@ -1,7 +1,7 @@
- name: "Generate eip-service.json and provider.json"
local_action:
module: simplevpn
- obfs4_state_dir: "{{ credentials_dir }}/shapeshifter"
+ obfs4_state_dir: "{{ credentials_dir }}/obfs4"
locations: "{{ locations }}"
domain: "{{ domain_public[0] }}"
provider_description: "{{ provider_config.description }}"
diff --git a/playbooks/init-credentials.yml b/playbooks/init-credentials.yml
index 2b24871..516cf6b 100644
--- a/playbooks/init-credentials.yml
+++ b/playbooks/init-credentials.yml
@@ -22,17 +22,17 @@
local_action: x509_ca ca_subject="{{ x509_ca_subject | default('CN=LEAP Root CA') }}" ca_cert_path="{{ credentials_dir }}/common/api_ca.crt" ca_key_path="{{ credentials_dir }}/common/api_ca.key"
register: api_ca_should_update
- - name: "Create shapeshifter state directory {{ credentials_dir }}/shapeshifter"
+ - name: "Create obfs4 state directory {{ credentials_dir }}/obfs4"
file:
- path: "{{ credentials_dir }}/shapeshifter"
+ path: "{{ credentials_dir }}/obfs4"
state: directory
# requires python3-pysodium
- - name: "Generate shapeshifter cert and json"
- local_action: shell {{playbook_dir}}/scripts/gen-shapeshifter-state.py {{ credentials_dir }}/shapeshifter
+ - name: "Generate obfs4 cert and json"
+ local_action: shell {{playbook_dir}}/scripts/gen-obfs4-state.py {{ credentials_dir }}/obfs4
- - name: "Encrypt shapeshifter state file"
- local_action: shell ansible-vault encrypt {{ credentials_dir }}/shapeshifter/obfs4_state.json
+ - name: "Encrypt obfs4 state file"
+ local_action: shell ansible-vault encrypt {{ credentials_dir }}/obfs4/obfs4_state.json
when: "lookup('env', 'ANSIBLE_VAULT_PASSWORD_FILE')"
- name: Include float init-credentials
diff --git a/playbooks/scripts/gen-shapeshifter-state.py b/playbooks/scripts/gen-obfs4-state.py
index 241c780..5d12617 100755
--- a/playbooks/scripts/gen-shapeshifter-state.py
+++ b/playbooks/scripts/gen-obfs4-state.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
"""
-Generates the Curve25519 keypair that is needed by the shapeshifter-dispatcher
-server.
+Generates the Curve25519 keypair that is needed by obfs4
Depends on python3-pysodium package.
"""
@@ -22,7 +21,7 @@ def generate(statedir):
os.makedirs(statedir)
except Exception:
pass
- print("[+] Generating shapeshifter parameters...")
+ print("[+] Generating obfs4 parameters...")
public, private = pysodium.crypto_box_keypair()