SpoofDPI
SpoofDPI copied to clipboard
Version argument doesn't show any version
Describe the bug
Running spoofdpi -v gives the output below:
spoog-dpi v0.0.0(dev)
A simple and fast anti-censorship tool written in Go.
https://github.com/xvzc/SpoofDPI
Expected behavior
It should give information about the version that is installed.
Actual behavior
It doesn't show any version.
How To Reproduce?
spoofdpi -v
Client information
OS: FreeBSD
Version: 14.1-RELEASE
Additional context
I didn't install spoofdpi through installation scripts that are made for Linux on readme. This may be causing this error. Also there is a typo: spoog-dpi --> spoof-dpi
while checking for version it shows
~ spoof-dpi -v
spoog-dpi v0.10.6
A simple and fast anti-censorship tool written in Go.
https://github.com/xvzc/SpoofDPI
this to me. So yes instead of spoof-dpi it shows spoog-dpi, as for version main.go file shows v0.0.0(dev), i think this is because they change that based on their version release. I am only fixing 'spoog-dpi' to 'spoof-dpi'
I didn't install spoof-dpi by using those installation scripts, so i think that's why this issue happens. Maybe you decide to perform version check way differently. Maybe by hard-coding version into program.
how did you install spoof-dpi?
ok makes sense, btw they have assigned var type to version variable
var VERSION = "v0.0.0(dev)"
to change while they release it i.e https://api.github.com/repos/xvzc/SpoofDPI/releases/latest changes value on the go, spoog is most probably a typo, which can be fixed
Easy fix, that would work with go install:
Save version in version.txt file and then add
import _ "embed"
//go:embed version.txt
var VERSION string
instead of setting it in the makefile.
how did you install spoof-dpi?
I have created a port of SpoofDPI for FreeBSD and installed by building it. You can think port like a PKGBUILD on Arch Linux. You can compile it through port's source code or install it as a package with package management tool.
See discussion https://github.com/xvzc/SpoofDPI/discussions/86
@flytaly Thanks, i didn't know that one.