FreeBSD Bugzilla – Attachment 252497 Details for
Bug 280591
net/spoofdpi: New port: Simple and fast anti-censorship tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[second patch] net/spoofdpi: Create rc.d script, user and group and replace binary name with spoofdpi
patch-2 (text/plain), 3.25 KB, created by
Yusuf Yaman
on 2024-08-04 12:20:33 UTC
(
hide
)
Description:
[second patch] net/spoofdpi: Create rc.d script, user and group and replace binary name with spoofdpi
Filename:
MIME Type:
Creator:
Yusuf Yaman
Created:
2024-08-04 12:20:33 UTC
Size:
3.25 KB
patch
obsolete
>From e12eb91951f0336025866225dfb29a99c6b12448 Mon Sep 17 00:00:00 2001 >From: Yusuf Yaman <nxjoseph@protonmail.com> >Date: Sun, 4 Aug 2024 15:16:21 +0300 >Subject: [PATCH] net/spoofdpi: Create rc.d script, add user and group and > replace binary name with spoofdpi > >PR: 280591 > >--- > GIDs | 2 +- > UIDs | 2 +- > net/spoofdpi/Makefile | 12 +++++++--- > net/spoofdpi/files/spoofdpi.in | 44 ++++++++++++++++++++++++++++++++++ > 4 files changed, 55 insertions(+), 5 deletions(-) > create mode 100644 net/spoofdpi/files/spoofdpi.in > >diff --git a/GIDs b/GIDs >index 2fe7c6905..d37f24024 100644 >--- a/GIDs >+++ b/GIDs >@@ -320,7 +320,7 @@ _wsdd:*:370: > # free: 377 > # free: 378 > # free: 379 >-# free: 380 >+spoofdpi:*:380: > # free: 381 > # free: 382 > # free: 383 >diff --git a/UIDs b/UIDs >index c4f31fcd8..74b16df83 100644 >--- a/UIDs >+++ b/UIDs >@@ -325,7 +325,7 @@ _wsdd:*:370:370::0:0:Web Service Discovery Daemon:/nonexistent:/usr/sbin/nologin > # free: 377 > # free: 378 > # free: 379 >-# free: 380 >+spoofdpi:*:380:380::0:0:SpoofDPI Daemon:/nonexistent:/usr/sbin/nologin > # free: 381 > # free: 382 > # free: 383 >diff --git a/net/spoofdpi/Makefile b/net/spoofdpi/Makefile >index c0f4e40f0..0d733d2f6 100644 >--- a/net/spoofdpi/Makefile >+++ b/net/spoofdpi/Makefile >@@ -34,10 +34,16 @@ GH_TUPLE= atomicgo:cursor:v0.2.0:atomicgo_cursor/vendor/atomicgo.dev/cursor \ > rivo:uniseg:v0.4.4:rivo_uniseg/vendor/github.com/rivo/uniseg \ > sirupsen:logrus:v1.9.3:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ > xo:terminfo:abceb7e1c41e:xo_terminfo/vendor/github.com/xo/terminfo >+USE_RC_SUBR= spoofdpi > >-GO_TARGET= ./cmd/spoof-dpi >-GO_BUILDFLAGS= -ldflags="-s -w" -o ./build/spoof-dpi >+GO_TARGET= ./cmd/spoof-dpi:spoofdpi >+GO_BUILDFLAGS= -ldflags="-s -w" -o ./build/spoofdpi > >-PLIST_FILES= bin/spoof-dpi >+SUB_LIST= USER=${USERS} >+USERS= spoofdpi >+GROUPS= spoofdpi >+ >+PLIST_FILES= bin/spoofdpi \ >+ etc/rc.d/spoofdpi > > .include <bsd.port.mk> >diff --git a/net/spoofdpi/files/spoofdpi.in b/net/spoofdpi/files/spoofdpi.in >new file mode 100644 >index 000000000..9094e7238 >--- /dev/null >+++ b/net/spoofdpi/files/spoofdpi.in >@@ -0,0 +1,44 @@ >+#!/bin/sh >+ >+# PROVIDE: spoofdpi >+# REQUIRE: LOGIN >+# KEYWORD: shutdown >+# >+# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to >+# enable spoofdpi: >+# spoofdpi_args (str): Custom additional arguments to be passed >+# spoofdpi (default empty). >+# spoofdpi_user (str): User to run spoofdpi as. Default >+# to "%%USER%%" created by the port. >+# spoofdpi_log (path): Console log file (default /dev/null). >+ >+. /etc/rc.subr >+ >+case $0 in >+/etc/rc*) >+ # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), >+ # so get the name of the script from $_file >+ name=$_file >+ ;; >+*) >+ name=$0 >+ ;; >+esac >+ >+name=${name##*/} >+rcvar="${name}_enable" >+ >+load_rc_config "${name}" >+ >+eval "${rcvar}=\${${rcvar}:-'NO'}" >+eval "_args=\${${name}_args:-''}" >+eval "_user=\${${name}_user:-'%%USER%%'}" >+eval "_log=\${${name}_log:-/dev/null}" >+ >+pidfile="/var/run/${name}.pid" >+ >+command="/usr/sbin/daemon" >+command_args="-P ${pidfile} -u ${_user} -f -H -o ${_log} -m 3 %%PREFIX%%/bin/spoofdpi -no-banner ${_args}" >+ >+run_rc_command "$1" >+ >-- >2.45.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280591
:
252479
|
252480
|
252481
|
252497
|
252529
|
252530
|
252531
|
252533
|
252534
|
252535