diff --git a/docs/systemd/wghttp.service b/docs/systemd/wghttp.service new file mode 100644 index 0000000..e1a60d5 --- /dev/null +++ b/docs/systemd/wghttp.service @@ -0,0 +1,14 @@ +[Unit] +Description=wghttp + +[Service] +Type=simple +Environment=PRIVATE_KEY=FIXME +Environment=PEER_KEY=FIXME +Environment=PEER_ENDPOINT=FIXME +Environment=CLIENT_IP=FIXME +ExecStart=%h/go/bin/wghttp --listen 127.0.0.1:1080 +Restart=on-failure + +[Install] +WantedBy=default.target diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 0000000..c68d72f --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,13 @@ +# Usage + +## Running as systemd service + +Since wghttp doesn't need any privilege, it's preferred to run as systemd user service. + +Copy [wghttp.service](./systemd/wghttp.service) to `~/.config/systemd/user/wghttp.service`. +After setting the environment options in `wghttp.service`, run: + +```bash +systemctl --user daemon-reload +systemctl --user enable --now wghttp +```