-
Notifications
You must be signed in to change notification settings - Fork 43
Cloud‐init configuration
Snawoot edited this page Jan 4, 2025
·
5 revisions
This cloud-init (24.3.1 and newer) configuration allows to install virtual server with dumbproxy in about 30 seconds.
Caution
Don't forget to replace USERNAME
and PASSWORD
with your actual values.
## template: jinja
#cloud-config
write_files:
- source:
{% if v1.machine == 'aarch64' %}
uri: https://github.com/SenseUnit/dumbproxy/releases/download/v1.20.1/dumbproxy.linux-arm64
{% else %}
uri: https://github.com/SenseUnit/dumbproxy/releases/download/v1.20.1/dumbproxy.linux-amd64
{% endif %}
path: /usr/local/bin/dumbproxy
permissions: '0755'
- content: |
OPTIONS=-auth basicfile://?path=/etc/dumbproxy.htpasswd -autocert -bind-address :443
path: /etc/default/dumbproxy
- content: |
[Unit]
Description=Dumb Proxy
Documentation=https://github.com/SenseUnit/dumbproxy/
After=network.target network-online.target
Requires=network-online.target
[Service]
EnvironmentFile=/etc/default/dumbproxy
User=root
Group=root
ExecStart=/usr/local/bin/dumbproxy $OPTIONS
TimeoutStopSec=5s
PrivateTmp=true
ProtectSystem=full
LimitNOFILE=20000
[Install]
WantedBy=default.target
path: /etc/systemd/system/dumbproxy.service
runcmd:
- [dumbproxy, -passwd, /etc/dumbproxy.htpasswd, USERNAME, PASSWORD]
- [systemctl, daemon-reload]
- [systemctl, enable, --now, --no-block, dumbproxy.service]