diff --git a/net/spoofdpi/Makefile b/net/spoofdpi/Makefile index b1462e1bae03..4a06d5c2596f 100644 --- a/net/spoofdpi/Makefile +++ b/net/spoofdpi/Makefile @@ -1,64 +1,77 @@ PORTNAME= spoofdpi DISTVERSIONPREFIX= v -DISTVERSION= 1.0.1 +DISTVERSION= 1.0.2 CATEGORIES= net MAINTAINER= nxjoseph@protonmail.com COMMENT= Simple and fast anti-censorship tool WWW= https://github.com/xvzc/SpoofDPI LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules USE_GITHUB= yes GH_ACCOUNT= xvzc GH_PROJECT= SpoofDPI -GH_TUPLE= atomicgo:cursor:v0.2.0:atomicgo_cursor/vendor/atomicgo.dev/cursor \ +GH_TUPLE= BurntSushi:toml:v1.5.0:burntsushi_toml/vendor/github.com/BurntSushi/toml \ + atomicgo:cursor:v0.2.0:atomicgo_cursor/vendor/atomicgo.dev/cursor \ atomicgo:keyboard:v0.2.9:atomicgo_keyboard/vendor/atomicgo.dev/keyboard \ atomicgo:schedule:v0.1.0:atomicgo_schedule/vendor/atomicgo.dev/schedule \ containerd:console:v1.0.3:containerd_console/vendor/github.com/containerd/console \ cpuguy83:go-md2man:v2.0.7:cpuguy83_go_md2man_v2/vendor/github.com/cpuguy83/go-md2man/v2 \ davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \ golang:mod:v0.18.0:golang_mod/vendor/golang.org/x/mod \ golang:net:v0.38.0:golang_net/vendor/golang.org/x/net \ golang:sync:v0.12.0:golang_sync/vendor/golang.org/x/sync \ golang:sys:v0.31.0:golang_sys/vendor/golang.org/x/sys \ golang:term:v0.30.0:golang_term/vendor/golang.org/x/term \ golang:text:v0.23.0:golang_text/vendor/golang.org/x/text \ golang:tools:v0.22.0:golang_tools/vendor/golang.org/x/tools \ google:gopacket:v1.1.19:google_gopacket/vendor/github.com/google/gopacket \ gookit:color:v1.5.4:gookit_color/vendor/github.com/gookit/color \ jackpal:gateway:v1.1.1:jackpal_gateway/vendor/github.com/jackpal/gateway \ lithammer:fuzzysearch:v1.1.8:lithammer_fuzzysearch/vendor/github.com/lithammer/fuzzysearch \ mattn:go-colorable:v0.1.13:mattn_go_colorable/vendor/github.com/mattn/go-colorable \ mattn:go-isatty:v0.0.19:mattn_go_isatty/vendor/github.com/mattn/go-isatty \ mattn:go-runewidth:v0.0.15:mattn_go_runewidth/vendor/github.com/mattn/go-runewidth \ miekg:dns:v1.1.61:miekg_dns/vendor/github.com/miekg/dns \ pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ pterm:pterm:v0.12.79:pterm_pterm/vendor/github.com/pterm/pterm \ rivo:uniseg:v0.4.4:rivo_uniseg/vendor/github.com/rivo/uniseg \ rs:zerolog:v1.33.0:rs_zerolog/vendor/github.com/rs/zerolog \ russross:blackfriday:v2.1.0:russross_blackfriday_v2/vendor/github.com/russross/blackfriday/v2 \ stretchr:objx:v0.5.2:stretchr_objx/vendor/github.com/stretchr/objx \ stretchr:testify:v1.11.1:stretchr_testify/vendor/github.com/stretchr/testify \ + urfave:cli-altsrc:v3.1.0:urfave_cli_altsrc_v3/vendor/github.com/urfave/cli-altsrc/v3 \ urfave:cli:v1.22.17:urfave_cli/vendor/github.com/urfave/cli \ urfave:cli:v3.5.0:urfave_cli_v3/vendor/github.com/urfave/cli/v3 \ xo:terminfo:abceb7e1c41e:xo_terminfo/vendor/github.com/xo/terminfo USE_RC_SUBR= ${PORTNAME} GO_TARGET= ./cmd/${PORTNAME} GO_BUILDFLAGS= -ldflags="-s -w" CGO_CFLAGS+= -I/usr/include CGO_LDFLAGS+= -L/usr/lib +SUB_FILES= pkg-message SUB_LIST= USER=${USERS} USERS= ${PORTNAME} GROUPS= ${PORTNAME} -PLIST_FILES= bin/${PORTNAME} +PLIST_FILES= "@dir(${USERS},${GROUPS},0770) ${ETCDIR}" \ + "@sample(${USERS},${GROUPS},0770) ${ETCDIR}/${PORTNAME}.toml.sample" \ + bin/${PORTNAME} post-patch: ${CP} ${FILESDIR}/modules.txt ${WRKSRC}/vendor + @${REINPLACE_CMD} -e '67s#/etc#${ETCDIR}#g' \ + -e '233s#"etc"#"${ETCDIR}"#g' \ + ${WRKSRC}/internal/config/cli.go + +post-install: + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/example_config.toml \ + ${STAGEDIR}${ETCDIR}/${PORTNAME}.toml.sample .include diff --git a/net/spoofdpi/distinfo b/net/spoofdpi/distinfo index 3486392cd019..4003ea3247f0 100644 --- a/net/spoofdpi/distinfo +++ b/net/spoofdpi/distinfo @@ -1,67 +1,71 @@ -TIMESTAMP = 1762465094 -SHA256 (xvzc-SpoofDPI-v1.0.1_GH0.tar.gz) = d1f38e25bbd9c9481e8d45c4734e3b13249fa2e3898f1203c8049f08bd007ab1 -SIZE (xvzc-SpoofDPI-v1.0.1_GH0.tar.gz) = 49233 +TIMESTAMP = 1762972888 +SHA256 (xvzc-SpoofDPI-v1.0.2_GH0.tar.gz) = ce784f8d00ef139659df2388a37604bb50c4008c6c957e43f647c2837a9da9d1 +SIZE (xvzc-SpoofDPI-v1.0.2_GH0.tar.gz) = 52399 +SHA256 (BurntSushi-toml-v1.5.0_GH0.tar.gz) = 723ede1a61ca8311046f840020e485dec3ceb2e614d1a539cd154375bdd7b8cb +SIZE (BurntSushi-toml-v1.5.0_GH0.tar.gz) = 118644 SHA256 (atomicgo-cursor-v0.2.0_GH0.tar.gz) = 61760aaf6b2a0b51adcea56913104aa070b844426063a21dac60551f239e5044 SIZE (atomicgo-cursor-v0.2.0_GH0.tar.gz) = 11330 SHA256 (atomicgo-keyboard-v0.2.9_GH0.tar.gz) = 6855b6e6e6837de6e9cfb98e0f49f6224eb599c688bdd4ce3a0c96b2f409bd07 SIZE (atomicgo-keyboard-v0.2.9_GH0.tar.gz) = 13554 SHA256 (atomicgo-schedule-v0.1.0_GH0.tar.gz) = 32b125a2d10d854d96eefd47e14e55d8fca725ac002b0287b32c34cf023d4896 SIZE (atomicgo-schedule-v0.1.0_GH0.tar.gz) = 6045 SHA256 (containerd-console-v1.0.3_GH0.tar.gz) = 61bc166fd91d4639870a2395ce7a89cb4585d343c521fcd397bef66324772f91 SIZE (containerd-console-v1.0.3_GH0.tar.gz) = 13712 SHA256 (cpuguy83-go-md2man-v2.0.7_GH0.tar.gz) = ca3a5b57e2c01759f5a00ad2a578d034c5370fae9aa7a6c3af5648b2fc802a92 SIZE (cpuguy83-go-md2man-v2.0.7_GH0.tar.gz) = 11337 SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152 SHA256 (go-yaml-yaml-v3.0.1_GH0.tar.gz) = cf05411540d3e6ef8f1fd88434b34f94cedaceb540329031d80e23b74540c4e5 SIZE (go-yaml-yaml-v3.0.1_GH0.tar.gz) = 91173 SHA256 (golang-mod-v0.18.0_GH0.tar.gz) = 247133e4ef1a5863af267a81c2d3f2b6e6b439f250db4e1d7e16df46d37e4d71 SIZE (golang-mod-v0.18.0_GH0.tar.gz) = 123147 SHA256 (golang-net-v0.38.0_GH0.tar.gz) = f5f44a7625a2cee3ab3b38f8b08a1e058395faf44c29ae5e9a29af9e5f13c822 SIZE (golang-net-v0.38.0_GH0.tar.gz) = 1502112 SHA256 (golang-sync-v0.12.0_GH0.tar.gz) = 1032c8a956571df44cfb3c22122a7a3a771af53b1af5698b15e0143a8aacfde7 SIZE (golang-sync-v0.12.0_GH0.tar.gz) = 17923 SHA256 (golang-sys-v0.31.0_GH0.tar.gz) = de9873501d7e57afe8964b48d17392f82b5f1fd611915e6084523f9eb7506972 SIZE (golang-sys-v0.31.0_GH0.tar.gz) = 1523040 SHA256 (golang-term-v0.30.0_GH0.tar.gz) = f8aede057e9335073ad5b4a4ccf1165f61e4b8d98c2ffa7de5667dcfe6011d23 SIZE (golang-term-v0.30.0_GH0.tar.gz) = 14692 SHA256 (golang-text-v0.23.0_GH0.tar.gz) = 941692d8d3a0b5998cabf9d3a9e6e3617665e1f2b50c71e0fee08c654bbed3df SIZE (golang-text-v0.23.0_GH0.tar.gz) = 8969153 SHA256 (golang-tools-v0.22.0_GH0.tar.gz) = ae80020fa6994e1e112478eb4fc3aefcf9b21500c6e2ef5c5b3bdbb3f8943f13 SIZE (golang-tools-v0.22.0_GH0.tar.gz) = 3853706 SHA256 (google-gopacket-v1.1.19_GH0.tar.gz) = 31efa87cc9d2b41e5e66c7daa8839d841d2a43cc477bf595c9e8c24ef6903830 SIZE (google-gopacket-v1.1.19_GH0.tar.gz) = 950745 SHA256 (gookit-color-v1.5.4_GH0.tar.gz) = cf2b13be6a78bd60f89713afab4b7bfb284199603f5a2b1c39fd684a3d0be690 SIZE (gookit-color-v1.5.4_GH0.tar.gz) = 2155201 SHA256 (jackpal-gateway-v1.1.1_GH0.tar.gz) = 69842d3b542a8c436f23fabaf40ec8ff88272e0639d7905c3bab2d94ea13b52b SIZE (jackpal-gateway-v1.1.1_GH0.tar.gz) = 16671 SHA256 (lithammer-fuzzysearch-v1.1.8_GH0.tar.gz) = 2496ccfc16d85426eb70aaf94f773f8ca08caf96694de3ede3c29d5978e28e50 SIZE (lithammer-fuzzysearch-v1.1.8_GH0.tar.gz) = 9373 SHA256 (mattn-go-colorable-v0.1.13_GH0.tar.gz) = c3b62c76d365906bba9aa9d9ec048fd33a2a5742299d6482a08e7466d4c52d77 SIZE (mattn-go-colorable-v0.1.13_GH0.tar.gz) = 9762 SHA256 (mattn-go-isatty-v0.0.19_GH0.tar.gz) = 67b1614d495030982d276b211f3ba2a155fad61919ba96e34db8e67ed28660e4 SIZE (mattn-go-isatty-v0.0.19_GH0.tar.gz) = 4679 SHA256 (mattn-go-runewidth-v0.0.15_GH0.tar.gz) = 44a5d37bd7119a9d288d7ff61cf3b4d42c2902c66b0d94136d41d2eb3cf2ba85 SIZE (mattn-go-runewidth-v0.0.15_GH0.tar.gz) = 18284 SHA256 (miekg-dns-v1.1.61_GH0.tar.gz) = 90333c02da30c7ec20688e854e34f71d450831e5c4eba007d828864bb4ff4d47 SIZE (miekg-dns-v1.1.61_GH0.tar.gz) = 217914 SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398 SHA256 (pterm-pterm-v0.12.79_GH0.tar.gz) = 230bef0c6e733ae600392d8c085b51331eeb29d789517cb75a28c9ed3c8c578d SIZE (pterm-pterm-v0.12.79_GH0.tar.gz) = 297646 SHA256 (rivo-uniseg-v0.4.4_GH0.tar.gz) = eb2837932d0a666e13ea6b4cebf698096266d4f14740faa78c63b8291cf1fb5c SIZE (rivo-uniseg-v0.4.4_GH0.tar.gz) = 453399 SHA256 (rs-zerolog-v1.33.0_GH0.tar.gz) = 7a32947b007164edb7a888048f8bec6d7de9cf503e79e099d6b6814fad0f6ac7 SIZE (rs-zerolog-v1.33.0_GH0.tar.gz) = 216046 SHA256 (russross-blackfriday-v2.1.0_GH0.tar.gz) = a13af0fc5305713f5154693feaf654d024689efea76390091a5e8c757335b4f4 SIZE (russross-blackfriday-v2.1.0_GH0.tar.gz) = 92896 SHA256 (stretchr-objx-v0.5.2_GH0.tar.gz) = c21c81a2e619fe8194c9cfafd577a72fe163df5a384d68799fbc54eef4b0e33f SIZE (stretchr-objx-v0.5.2_GH0.tar.gz) = 33222 SHA256 (stretchr-testify-v1.11.1_GH0.tar.gz) = 4b51fbc0f19e42841013748e6d527314e1d0e7255122766b5fca1d35b4630c69 SIZE (stretchr-testify-v1.11.1_GH0.tar.gz) = 116832 +SHA256 (urfave-cli-altsrc-v3.1.0_GH0.tar.gz) = df76476f76680af4f26142ee675857a9e0c684b4f7e183bf9ba089ebe54b1302 +SIZE (urfave-cli-altsrc-v3.1.0_GH0.tar.gz) = 9968 SHA256 (urfave-cli-v1.22.17_GH0.tar.gz) = 44e20f78e0d399014591e1d0bd3c520dfff65a27ec2ad1310649eca5e56521e4 SIZE (urfave-cli-v1.22.17_GH0.tar.gz) = 80511 SHA256 (urfave-cli-v3.5.0_GH0.tar.gz) = bb5987d7ba2c59721496e01a246732955051140126df5f1e6da6d9c9c20ad5e2 SIZE (urfave-cli-v3.5.0_GH0.tar.gz) = 6805679 SHA256 (xo-terminfo-abceb7e1c41e_GH0.tar.gz) = f309fc85594b3a03d622ebe275a841b97101c4189f85fff18fc051a2e5a4878c SIZE (xo-terminfo-abceb7e1c41e_GH0.tar.gz) = 35180 diff --git a/net/spoofdpi/files/modules.txt b/net/spoofdpi/files/modules.txt index e8e4eaad2c0f..6aa37b42e937 100644 --- a/net/spoofdpi/files/modules.txt +++ b/net/spoofdpi/files/modules.txt @@ -1,109 +1,116 @@ # atomicgo.dev/cursor v0.2.0 ## explicit; go 1.15 # atomicgo.dev/keyboard v0.2.9 ## explicit; go 1.15 # atomicgo.dev/schedule v0.1.0 ## explicit; go 1.18 +# github.com/BurntSushi/toml v1.5.0 +## explicit; go 1.18 +github.com/BurntSushi/toml +github.com/BurntSushi/toml/internal # github.com/containerd/console v1.0.3 ## explicit; go 1.13 # github.com/cpuguy83/go-md2man/v2 v2.0.7 ## explicit; go 1.12 # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew # github.com/google/gopacket v1.1.19 ## explicit; go 1.12 github.com/google/gopacket github.com/google/gopacket/layers github.com/google/gopacket/pcap # github.com/gookit/color v1.5.4 ## explicit; go 1.18 # github.com/jackpal/gateway v1.1.1 ## explicit; go 1.24.2 github.com/jackpal/gateway # github.com/lithammer/fuzzysearch v1.1.8 ## explicit; go 1.15 # github.com/mattn/go-colorable v0.1.13 ## explicit; go 1.15 github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.19 ## explicit; go 1.15 github.com/mattn/go-isatty # github.com/mattn/go-runewidth v0.0.15 ## explicit; go 1.9 # github.com/miekg/dns v1.1.61 ## explicit; go 1.19 github.com/miekg/dns # github.com/pmezard/go-difflib v1.0.0 ## explicit github.com/pmezard/go-difflib/difflib # github.com/pterm/pterm v0.12.79 ## explicit; go 1.21 # github.com/rivo/uniseg v0.4.4 ## explicit; go 1.18 # github.com/rs/zerolog v1.33.0 ## explicit; go 1.15 github.com/rs/zerolog github.com/rs/zerolog/internal/cbor github.com/rs/zerolog/internal/json +github.com/rs/zerolog/log # github.com/russross/blackfriday/v2 v2.1.0 ## explicit # github.com/stretchr/objx v0.5.2 ## explicit; go 1.20 github.com/stretchr/objx # github.com/stretchr/testify v1.11.1 ## explicit; go 1.17 github.com/stretchr/testify/assert github.com/stretchr/testify/assert/yaml github.com/stretchr/testify/mock # github.com/urfave/cli v1.22.17 ## explicit; go 1.11 +# github.com/urfave/cli-altsrc/v3 v3.1.0 +## explicit; go 1.23.2 # github.com/urfave/cli/v3 v3.5.0 ## explicit; go 1.22 +github.com/urfave/cli/v3 # github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e ## explicit; go 1.19 # golang.org/x/mod v0.18.0 ## explicit; go 1.18 golang.org/x/mod/semver # golang.org/x/net v0.38.0 ## explicit; go 1.23.0 golang.org/x/net/bpf golang.org/x/net/internal/iana golang.org/x/net/internal/socket golang.org/x/net/ipv4 golang.org/x/net/ipv6 golang.org/x/net/route # golang.org/x/sync v0.12.0 ## explicit; go 1.23.0 golang.org/x/sync/errgroup # golang.org/x/sys v0.31.0 ## explicit; go 1.23.0 golang.org/x/sys/unix golang.org/x/sys/windows -golang.org/x/sys/windows/registry # golang.org/x/term v0.30.0 ## explicit; go 1.23.0 # golang.org/x/text v0.23.0 ## explicit; go 1.23.0 # golang.org/x/tools v0.22.0 ## explicit; go 1.19 golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/internal/packagesdriver golang.org/x/tools/go/packages golang.org/x/tools/go/types/objectpath golang.org/x/tools/internal/aliases golang.org/x/tools/internal/event golang.org/x/tools/internal/event/core golang.org/x/tools/internal/event/keys golang.org/x/tools/internal/event/label golang.org/x/tools/internal/gcimporter golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/packagesinternal golang.org/x/tools/internal/pkgbits golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/tokeninternal golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 diff --git a/net/spoofdpi/files/pkg-message.in b/net/spoofdpi/files/pkg-message.in new file mode 100644 index 000000000000..2c70f131080e --- /dev/null +++ b/net/spoofdpi/files/pkg-message.in @@ -0,0 +1,37 @@ +[ +{ type: install + message: < -listen-addr, -port => -listen-port and etc. +See the commit link below or project page for the new documentation. + # https://github.com/xvzc/${PORTNAME}/commit/a2993ac68d87a0525a93bc23984d21e341214199 +EOM +} +{ type: upgrade + maximum_version: "1.0.1" + message: << EOM +A new feature (-fake-https-packets) has been added that adds up a dependency on ${PORTNAME}: libpcap. This feature requires the daemon to be run as root if it is enabled with an argument, it will fail with the default '${PORTNAME}' user, to be able to use it, switch the daemon user to root. + # sysrc ${PORTNAME}_user="root" +EOM +} +{ type: upgrade + maximum_version: "1.0.2" + message: << EOM +${PORTNAME} now supports configuration files written in TOML, installed in ${ETCDIR} directory with a sample config file. +Options given through the command-line flags (via rc.conf or as user) will override the options set by the config file. +You can edit the config via being as root or adding your user to the ${PORTNAME} group (default group). +Config locations are: $SPOOFDPI_CONFIG environment variable, ${ETCDIR}/${PORTNAME}.toml, $XDG_CONFIG_HOME/${PORTNAME}/${PORTNAME}.toml and $HOME/.config/${PORTNAME}/${PORTNAME}.toml +EOM +} +] diff --git a/net/spoofdpi/pkg-message b/net/spoofdpi/pkg-message deleted file mode 100644 index a852b9519b62..000000000000 --- a/net/spoofdpi/pkg-message +++ /dev/null @@ -1,30 +0,0 @@ -[ -{ type: install - message: < -listen-addr, -port => -listen-port and etc. -See the commit link below or project page for new changes in arguments usage. - # https://github.com/xvzc/SpoofDPI/commit/a2993ac68d87a0525a93bc23984d21e341214199 -EOM -} -{ type: upgrade - maximum_version: "1.0.1" - message: << EOM -A new feature (-fake-https-packets) has been added that adds up a dependency on SpoofDPI: libpcap. This feature requires the daemon to be run as root if it is enabled with an argument, it will fail with the default 'spoofdpi' user, to be able to use it, switch the daemon user to root. - # sysrc spoofdpi_user="root" -EOM -} -]