mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-05 19:43:22 +02:00
Fix dnscrypt-proxy by not masking the socket
Problem: Masking dnscrypt-proxy.socket prevents the service from starting because the service has Requires=dnscrypt-proxy.socket dependency. Solution: Simply stop and disable the socket without masking it. This prevents socket activation while allowing the service to start and bind directly to the configured IPs. Changes: - Removed socket masking (just disable it) - Moved socket disabling before service start - Removed invalid systemd directives from override Testing: Confirmed dnscrypt-proxy now listens on VPN service IPs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3835fe882f
commit
0524908ba7
2 changed files with 8 additions and 11 deletions
|
@ -26,17 +26,16 @@
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
- name: Ubuntu | Stop and disable dnscrypt-proxy socket before starting service
|
||||||
|
systemd:
|
||||||
|
name: dnscrypt-proxy.socket
|
||||||
|
state: stopped
|
||||||
|
enabled: false
|
||||||
|
failed_when: false
|
||||||
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
- name: dnscrypt-proxy enabled and started
|
- name: dnscrypt-proxy enabled and started
|
||||||
service:
|
service:
|
||||||
name: dnscrypt-proxy
|
name: dnscrypt-proxy
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: Ubuntu | Disable dnscrypt-proxy socket activation after service start
|
|
||||||
systemd:
|
|
||||||
name: dnscrypt-proxy.socket
|
|
||||||
state: stopped
|
|
||||||
enabled: false
|
|
||||||
masked: true
|
|
||||||
failed_when: false
|
|
||||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
||||||
|
|
|
@ -58,8 +58,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
After=systemd-resolved.service
|
After=systemd-resolved.service
|
||||||
Requires=systemd-resolved.service
|
Requires=systemd-resolved.service
|
||||||
# Remove socket dependency to allow direct binding
|
|
||||||
TriggeredBy=
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue