I would like to upgrade obfs4proxy on my Debian “Buster” server. Unfortunately there is no current Debian package for Buster at the moment. So I did build it from source. The build process ran without any issues, but when I run obfs4proxy, I immediately get an error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x658478]
goroutine 1 [running]:
filippo.io/edwards25519/field.(*Element).Subtract(0xc0000cde40, 0xc0000cde68, 0x0, 0x20)
filippo.io/edwards25519.(*Point).SetBytes(0xc0001000b0, 0xc0000b40a0, 0x20, 0x20, 0xc0000cdf48, 0x653c03, 0xc0000982a0)
go version go1.12.4 linux/amd64
Any ideas how I can solve the problem ?
Thank you in advance.
I don’t know, i can only tell you how I did it if it’s helpful to you:
tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz
sed -i ‘$ a PATH=$PATH:/usr/local/go/bin’ ~/.profile
sed -i ‘$ a GOPATH=$HOME/go’ ~/.profile
git clone GitHub - Yawning/obfs4: The obfourscator (Courtesy mirror)
go build -o obfs4proxy/obfs4proxy ./obfs4proxy
mv /obfs4proxy/obfs4proxy /usr/bin/
sudo setcap cap_net_bind_service=+ep /usr/bin/obfs4proxy
Working on my Debian.
@Vertux I suggest trying with a more recent version of the Go compiler. You can get go1.15 from buster-backports:
- Create a file /etc/apt/sources.list.d/buster-backports.list that contains the line:
deb http://deb.debian.org/debian bullseye-backports main
apt-get install -t buster-backports golang
The runtime error you get with go1.12 is surprising. It looks like it’s the result of the compiler running global variable initialization in the wrong order. Specifically, the initialization of
SetBytes which calls
Subtract on the global variable
feOne has not been initialized at that point. The compiler should initialize
identity, but it initializes
It surprises me because the order of global variable initialization is specified to examine the dependencies between variables and initialize them in the proper order. But there are also issues like #51913, so perhaps this is something that has changed over versions.
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
@dcf @pogo I have installed go v1.19 and everything worked like a charm. Obviously my go v1.12.4 was too old.
Maybe the dependencies :
Go 1.11.0 or later. should be adjusted.
Thank you for your help.