SpoofDPI icon indicating copy to clipboard operation
SpoofDPI copied to clipboard

Version argument doesn't show any version

Open nxjosephofficial opened this issue 1 year ago • 7 comments
trafficstars

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

image

nxjosephofficial avatar Aug 06 '24 11:08 nxjosephofficial

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'

qxrein avatar Aug 06 '24 13:08 qxrein

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.

ghost avatar Aug 06 '24 13:08 ghost

how did you install spoof-dpi?

xvzc avatar Aug 06 '24 13:08 xvzc

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

qxrein avatar Aug 06 '24 13:08 qxrein

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.

flytaly avatar Aug 06 '24 13:08 flytaly

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

ghost avatar Aug 06 '24 13:08 ghost

@flytaly Thanks, i didn't know that one.

xvzc avatar Aug 07 '24 06:08 xvzc