diff --git a/README.md b/README.md index 3362d2d..89da995 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ ciadpi --fake -1 --ttl 8 -p, --port Прослушиваемый порт, по умолчанию 1080 +-D, --daemon + Запуск в режиме демона + Поддерживается только в Linux и BSD системах + +-w, --pidfile + Расположение PID-файла + -E, --transparent Запуск в режиме прозрачного прокси, SOCKS работать не будет diff --git a/dist/bsd/README.md b/dist/bsd/README.md new file mode 100644 index 0000000..a8f9d2c --- /dev/null +++ b/dist/bsd/README.md @@ -0,0 +1,26 @@ +# Installing on BSD + +Tested on FreeBSD 14.1 and DrafonFly BSD 6.4 + +## Building +```sh +cd byedpi/ +make +sudo make install +``` + +## System Service + +You can configure the program to run as system service. + +### As system service: + +```sh +sudo cp byedpi /usr/local/etc/init.d +sudo sysrc byedpi_enable="YES" +``` + +You should see the service now marked as "active": +```sh +sudo service byedpi status +``` diff --git a/dist/bsd/byedpi b/dist/bsd/byedpi new file mode 100755 index 0000000..5532ffd --- /dev/null +++ b/dist/bsd/byedpi @@ -0,0 +1,28 @@ +#!/bin/sh + +# PROVIDE: byedpi +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Define these byedpi_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/byedpi +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE + +byedpi_enable=${byedpi_enable-"NO"} +byedpi_flags=${byedpi_flags-"--daemon --pidfile /var/run/ciadpi.pid -split 1 --disorder 3+s --mod-http=h,d --auto=torst --tlsrec 1+s"} + +. /etc/rc.subr + +name="byedpi" +rcvar=byedpi_enable +command="/usr/local/bin/ciadpi" + +load_rc_config $name + +start_cmd="echo \"Starting ${name}.\"; ${command} ${byedpi_flags}" + +run_rc_command "$1"