Compile XDAG proxy for Windows

FSOL
4 min readNov 3, 2022

--

This tutorial is based on Swordlet’s Github documentation (https://github.com/XDagger/xmrig2xdag/blob/main/README.md) with some explanations & details for beginners.

Validate on : Windows 11 21H2.

Photo : FSOL

1°/ Install and update MSYS2 environment

  • Run installation (follow guide as written on msys2’s website)

Select default path for install

When this window appear, you’re ready to go :

Now install gcc (GNU Compiler Collection) :

pacman -S mingw-w64-x86_64-gcc
gcc is now install

Note : Follow upgrade process on https://www.msys2.org/docs/updating/ .

In details:

pacman -Suy
Confirm to close

After closing, repeat again :

pacman -Suy
Always confirm

In some case, AV program can rise up :

Create an exception if necessary to complete install

2°/ Cloning from GitHub

We need to install ‘git’ for msys2 :

pacman -S git
Always confirm

Then enter :

cd
git clone https://github.com/XDagger/xmrig2xdag.git
Result cloning sources

Same as above, AV program can rise up :

Create an exception if necessary

As you can see, we retreive xmrig2xdag sources :

3°/ Install MSYS missing packages

Let’s install ‘cmake’ & ‘make’ packages :

pacman -S make cmake

Now let’s install go language :

pacman -S mingw-w64-x86_64-go

Setup some vars :

export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64

4°/ Build something in /clib

Now enter :

cd xmrig2xdag/clib
cmake .

And then you’ll get this :

So write :

make

And you’ll get :

Let’s see what we generate :

ls -l

We have to rename file you obtain :

mv libxdag_crypto_MINGW64_NT-*.a libxdag_crypto_Windows.a

The end of file name could change. It’s depend of your Windows release. By example for Windows 11, could finish by ‘NT-10.0–22000.a’ . It’s not a matter !

So now you should obtain this :

5°/ Final build

cd ../server
go mod tidy
CGO_ENABLED=1 go build

So I’ll get :

Let’s verify what we get :

ls -l

6°/ Proof Of Work

Copy your usual config.json file, already set with settings pool.

Example of content (edit with VSCODE) :

Write correct pool address & port

Now launch it, and then XMRIG miner.

And ‘Hocus-pocus’ you should get this :

Miner connect to proxy

BRAVO ! You did it !!!

Many many thanks to :

--

--