Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comma bug in wg config, Dockerfile dependencies, added 'update' to Makefile #14153

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3-alpine

ARG VERSION="git"
ARG PACKAGES="bash libffi openssh-client openssl rsync tini gcc libffi-dev linux-headers make musl-dev openssl-dev"
ARG PACKAGES="bash libffi openssh-client openssl rsync tini gcc libffi-dev linux-headers make musl-dev openssl-dev cargo"

LABEL name="algo" \
version="${VERSION}" \
Expand Down
24 changes: 18 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## docker-build: Build and tag a docker image
.PHONY: docker-build

IMAGE := trailofbits/algo
TAG := latest
DOCKERFILE := Dockerfile
CONFIGURATIONS := $(shell pwd)
IMAGE := trailofbits/algo
TAG := latest
DOCKERFILE := Dockerfile
PWD := $$(pwd)

docker-build:
docker build \
Expand All @@ -21,10 +21,22 @@ docker-deploy:
--cap-drop=all \
--rm \
-it \
-v $(CONFIGURATIONS):/data \
-v $(PWD):/data \
$(IMAGE):$(TAG)

## docker-clean: Remove images and containers.
# update the users on existing VPN
.PHONY: docker-update

docker-update:
docker run \
--cap-drop=all \
--rm \
-it \
-e "ALGO_ARGS=update-users" \
-v $(PWD):/data \
$(IMAGE):$(TAG)

## docker-prune: Remove images and containers.
.PHONY: docker-prune

docker-prune:
Expand Down
1 change: 0 additions & 1 deletion playbooks/cloud-pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
state: present
name:
- pyOpenSSL>=0.15
- jinja2==2.8
- segno
tags:
- always
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ansible==2.9.7
jinja2==2.8
netaddr
6 changes: 2 additions & 4 deletions roles/wireguard/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ wireguard_dns_servers: >-
{% for host in dns_servers.ipv4 %}{{ host }}{% if not loop.last %},{% endif %}{% endfor %}{% if ipv6_support %},{% for host in dns_servers.ipv6 %}{{ host }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
{% endif %}
wireguard_client_ip: >-
{{ wireguard_network_ipv4 | ipmath(index|int+2) }}
{{ ',' + wireguard_network_ipv6 | ipmath(index|int+2) if ipv6_support else '' }}
{{ wireguard_network_ipv4 | ipmath(index|int+2) }}{{ ', ' + wireguard_network_ipv6 | ipmath(index|int+2) if ipv6_support else '' }}
wireguard_server_ip: >-
{{ wireguard_network_ipv4 | ipaddr('1') }}
{{ ',' + wireguard_network_ipv6 | ipaddr('1') if ipv6_support else '' }}
{{ wireguard_network_ipv4 | ipaddr('1') }}{{ ', ' + wireguard_network_ipv6 | ipaddr('1') if ipv6_support else '' }}