mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-22 06:15:14 +00:00
Separate options from service, add system service (#152)
This commit is contained in:
parent
77ac202f5c
commit
dca3b5693a
22
dist/linux/README.md
vendored
22
dist/linux/README.md
vendored
@ -9,16 +9,30 @@ sudo make install
|
|||||||
|
|
||||||
## Systemd Service (optional)
|
## Systemd Service (optional)
|
||||||
|
|
||||||
Copy and enable the service:
|
You can configure the program to run as systemd service, user- or system-wide (only one at a time).
|
||||||
|
|
||||||
|
### As user service:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cp byedpi.service ~/.config/systemd/user/
|
cp byedpi.service ~/.config/systemd/user/
|
||||||
systemctl --user daemon-reload
|
cp byedpi.conf ~/.config/
|
||||||
systemctl --user enable byedpi.service
|
systemctl --user enable --now byedpi.service
|
||||||
systemctl --user start byedpi.service
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see the service now marked as "active":
|
You should see the service now marked as "active":
|
||||||
```sh
|
```sh
|
||||||
systemctl --user status byedpi.service
|
systemctl --user status byedpi.service
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### As system service:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo cp byedpi.service /etc/systemd/system/
|
||||||
|
sudo cp byedpi.conf /etc/
|
||||||
|
sudo systemctl enable --now byedpi.service
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see the service now marked as "active":
|
||||||
|
```sh
|
||||||
|
systemctl status byedpi.service
|
||||||
|
```
|
||||||
|
8
dist/linux/byedpi.conf
vendored
Normal file
8
dist/linux/byedpi.conf
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# More options and their descriptions can be found here:
|
||||||
|
# https://github.com/hufrea/byedpi/blob/main/README.md
|
||||||
|
#
|
||||||
|
# By default, ciadpi listens on all interfaces,
|
||||||
|
# a specific one can be specified via "--ip 127.0.0.1".
|
||||||
|
|
||||||
|
# Put your options here
|
||||||
|
BYEDPI_OPTIONS="--split 1 --disorder 3+s --mod-http=h,d --auto=torst --tlsrec 1+s"
|
13
dist/linux/byedpi.service
vendored
13
dist/linux/byedpi.service
vendored
@ -1,12 +1,17 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=byedpi
|
Description=ByeDPI
|
||||||
Documentation=https://github.com/hufrea/byedpi
|
Documentation=https://github.com/hufrea/byedpi
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target nss-lookup.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=ciadpi --split 1 --disorder 3+s --mod-http=h,d --auto=torst --tlsrec 1+s
|
NoNewPrivileges=yes
|
||||||
|
StandardOutput=null
|
||||||
|
StandardError=journal
|
||||||
|
EnvironmentFile=-/etc/byedpi.conf
|
||||||
|
EnvironmentFile=-%h/.config/byedpi.conf
|
||||||
|
ExecStart=ciadpi $BYEDPI_OPTIONS
|
||||||
TimeoutStopSec=5s
|
TimeoutStopSec=5s
|
||||||
LimitNOFILE=1048576
|
|
||||||
LimitNPROC=512
|
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user