xvzc / SpoofDPI

A simple and fast anti-censorship tool written in Go
Apache License 2.0
3.75k stars 257 forks source link

./spoof-dpi: line 9: syntax error: unexpected ")" #64

Closed userosos closed 3 months ago

userosos commented 4 months ago
root@AX6000_home:/tmp# wget https://github.com/xvzc/SpoofDPI/releases/download/v0.10.0/spoof-dpi-linux.tar.gz

root@AX6000_home:/tmp# curl -fsSL https://raw.githubusercontent.com/xvzc/SpoofDPI/main/install.sh | bash -s linux
xargs: unrecognized option: I
BusyBox v1.36.1 (2024-06-26 01:47:57 UTC) multi-call binary.

Usage: xargs [OPTIONS] [PROG ARGS]

Run PROG on every item given by stdin

        -0      NUL terminated input
        -o      Reopen stdin as /dev/tty
        -r      Don't run command if input is empty
        -t      Print the command on stderr before execution
        -p      Ask user whether to run each command
        -E STR,-e[STR]  STR stops input processing
        -n N    Pass no more than N args to PROG
        -s N    Pass command line of no more than N bytes
        -x      Exit if size is exceeded
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5296    0  5296    0     0  13523      0 --:--:-- --:--:-- --:--:-- 13579
./spoof-dpi

Successfully installed SpoofDPI.
Please add the line below to your rcfile(.bashrc or .zshrc etc..)

>>    export PATH=$PATH:~/.spoof-dpi/bin

root@AX6000_home:/tmp# cd ~/.spoof-dpi/bin
root@AX6000_home:~/.spoof-dpi/bin# ./spoof-dpi
./spoof-dpi: line 9: syntax error: unexpected ")"

OS: LuCI openwrt-23.05 branch (git-24.086.45142-09d5a38) / OpenWrt 23.05.3 (r23809-234f1a2efa)

Additional context

hufrea commented 4 months ago

I think your architecture is not amd, check the output of uname -a

MahouShoujoMivutilde commented 4 months ago

Go programs are super easy to cross compile, considering this is a router, depending on the arch in uname -a, go to ./cmd/spoof-dpi and try building on pc with

# aarch64 / armv8
GOOS=linux GOARCH=arm64 go build -ldflags="-w -s -X main.VERSION=v0.10.0"

or

# armv7 / armv7l should work too
GOOS=linux GOARCH=arm go build -ldflags="-w -s -X main.VERSION=v0.10.0"

it could even be mips / mipsle / mips64 / mips64le

See https://go.dev/wiki/GoArm#supported-architectures

Then send it to the router using scp.

EDIT

  • Archer AX6000 from specs: "Powerful Processing - 1.8 GHz Quad-Core CPU and 2 co-processors eradicate latency and deliver stable performance"

Never mind, this is almost certainly arm64.